Deprecated usage of getter

Running Xwiki 12.1 in Docker, noticed the following spamming my logs:

xwiki-postgres-tomcat-web | 2020-03-16 21:49:31,029 [http://test.wiki.mydomain.com/bin/view/OnlineUsers/GetOnlineUsers?xpage=plain&xpage=plain] WARN o.a.v.introspection - Deprecated usage of getter [com.xpn.xwiki.api.DeprecatedContext.getContext] in xwiki:OnlineUsers.GetOnlineUsers@4,67

I’m guessing it has to do with that extension and nothing that I can do in Xwiki?

Hi, yes it just means that the extension you’re using (which is not a supported extension BTW), uses an old deprecated API.

Fantastic - so, I uninstalled that extension - yet, it still seems to be working?

I restarted Xwiki - still there…very strange…

When searching extensions, it shows up as “local” but not installed…

Note that you could have left it if you wanted. Deprecated just means deprecated, i.e. that the API may disappear one day, but it’s still working.

Yeah but the problem is that it’s flooding the log.

Solution for that: https://www.xwiki.org/xwiki/bin/view/FAQ/How+to+avoid+deprecated+messages+in+the+logs

1 Like

Tried:

t# grep logging.deprecated.enabled /usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.properties
velocity.properties = logging.deprecated.enabled = false

Still see the messages in the log:

{“log”:“2020-03-18 16:37:08,676 [http://test.wiki.my.domain/bin/view/OnlineUsers/GetOnlineUsers?xpage=plain\u0026xpage=plain] WARN o.a.v.introspection - Deprecated usage of method [com.xpn.xwiki.api.Util.getDate] in xwiki:OnlineUsers.GetOnlineUsers@9,19 \n”,“stream”:“stdout”,“time”:“2020-03-18T16:37:08.676716245Z”}
{“log”:“2020-03-18 16:37:08,676 [http://test.wiki.my.domain/bin/view/OnlineUsers/GetOnlineUsers?xpage=plain\u0026xpage=plain] WARN o.a.v.introspection - Deprecated usage of getter [com.xpn.xwiki.api.DeprecatedContext.getContext] in xwiki:OnlineUsers.GetOnlineUsers@10,74 \n”,“stream”:“stdout”,“time”:“2020-03-18T16:37:08.677016062Z”}

Running 12.1

All right - guessed that I didn’t need that in the velocity section and placed:

logging.deprecated.enabled=false

At the end of the file - so that stopped those logs.

I see this now every 10 seconds:

{"log":"2020-03-18 16:52:48,096 [http://test.wiki.my.domain/bin/view/OnlineUsers/GetOnlineUsers?xpage=plain\u0026xpage=plain] WARN  t.DefaultTransformationManager - Failed to locate transformation with hint [numberedheadings], ignoring it. Root reason [ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.rendering.transformation.Transformation] and hint [numberedheadings]] \n","stream":"stdout","time":"2020-03-18T16:52:48.096885731Z"}
{"log":"2020-03-18 16:52:48,098 [http://test.wiki.my.domain/bin/view/OnlineUsers/GetOnlineUsers?xpage=plain\u0026xpage=plain] WARN  t.DefaultTransformationManager - Failed to locate transformation with hint [numberedfigures], ignoring it. Root reason [ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.rendering.transformation.Transformation] and hint [numberedfigures]] \n","stream":"stdout","time":"2020-03-18T16:52:48.098612543Z"}

This is not a deprecation warning and it’s not related to this online extension. It just means that you have installed the numbered reference transformation extension and you’ve configured it but then you uninstalled it and forgot to unconfigure it… See https://extensions.xwiki.org/xwiki/bin/view/Extension/Numbered%20Reference%20Macro/#HPrerequisites26InstallationInstructions

1 Like