How to avoid deprecated messages in the logs?

Version 2.1 by Valdis Vitolins on 2013/12/05

You may be seeing a lot of messages such as:

2013-07-24 10:38:45,085 [http://docstestsite.myxwiki.org/xwiki/bin/register/XWiki/Register] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.web.XWikiMessageTool.get] in docstestsite:Panels.Search@2,25

There are 2 solutions to remove them:

  • Solution 1: Fix deprecation usages.
    Main issue is Velocity code $msg.get which should be changed to $services.localization.get

  • Solution 2: Configure XWiki to not log deprecated calls. You do this by editing your WEB-INF/xwiki.properties and adding:
    velocity.properties = runtime.introspector.uberspect.chainClasses = org.apache.velocity.util.introspection.SecureUberspector\,org.xwiki.velocity.introspection.MethodArgumentsUberspector
Tags:
   

Get Connected