(new) log4j warning with XSLT transformation via ANT

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Ron Van den Branden
Posts: 65
Joined: Fri Jan 18, 2008 5:54 pm

(new) log4j warning with XSLT transformation via ANT

Post by Ron Van den Branden »

Hi,

When performing an XSLT transformation via an ANT task with Oxygen-19.1, I notice how I'm getting a warning I don't recall seeing before:

Code: Select all


     [java] log4j:WARN No appenders could be found for logger (ro.sync.util.security.f).
[java] log4j:WARN Please initialize the log4j system properly.
Note: the transformation does succeed without problems, but this warning seems to be new.

This happens with following (simplified) ANT target:

Code: Select all


  <target name="transform-xslt">
<java classname="net.sf.saxon.Transform">
<arg value="-s:${cfd}/test-in.xml"/>
<arg value="-xsl:${cfd}/xslt/doc.xsl"/>
<arg value="-o:${cfd}/out/test-out.xml"/>
</java>
</target>
The ANT transformation is executed with following jars on the classpath:

Code: Select all


${oxygenHome}/lib/oxygen.jar
${oxygenHome}/lib/resolver.jar
${oxygenHome}/lib/xercesImpl.jar
${oxygenHome}/lib/saxon9ee.jar
${oxygenHome}/lib/log4j.jar
${oxygenHome}/lib/fop.jar
${oxygenHome}/lib/batik-all-*.jar
${oxygenHome}/lib/commons-logging-*.jar
${oxygenHome}/lib/xmlgraphics-commons-*.jar
${oxygenHome}/lib/commons-io-*.jar
${oxygenHome}/lib/avalon-framework-*.jar
Is there anything wrong here that should be corrected, in order to make the logging warning disappears?

Best,

Ron
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: (new) log4j warning with XSLT transformation via ANT

Post by Radu »

Hi Ron,

The warning you receive right now is benign and can be ignored.
But you can add to that classpath list also this entry ${oxygenHome}/ because in the Oxygen installation folder there is a log4j.properties file which is used to initialize the log4j logging facility.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Ron Van den Branden
Posts: 65
Joined: Fri Jan 18, 2008 5:54 pm

Re: (new) log4j warning with XSLT transformation via ANT

Post by Ron Van den Branden »

Hi Radu,

Thanks, that makes sense. I don't see a ${oxygenHome}/log4j.properties file, though, but it does work with the one I find at ${oxygenHome}/frameworks/dita/DITA-OT/. Adding this path to the classpath indeed solves the issue at hand.

I have control over the framework I'm developing this ANT scenario for, so I'll add a log4j.properties there.

Thanks,

Ron
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: (new) log4j warning with XSLT transformation via ANT

Post by Radu »

Hi Ron,

You did the right thing.
Oxygen 20 (Spring 2018) will no longer issue this warning even if you do not have in the libraries path a reference to a folder containing a "log4j.properties".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply