Bug#575411: fop: log4j not initialized correctly
Patch dump_exception.patch is probably redundant with a working logging configuration (3 lines below the exception is logged). Moreover, it should not print traces to stdout (the real output of fop might be sent there). -- Gabriel -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#575411: fop: log4j not initialized correctly
In fact the bug is not fixed by FOP 1.0. It is fixed by Debian patch 04_fixqdoxbuildfailure.patch : [...] --- /dev/null1970-01-01 00:00:00.0 + +++ fop-1.0/fop.mf2011-08-26 15:15:10.0 +0200 @@ -0,0 +1,1 @@ +Class-Path: xercesImpl.jar xalan2.jar bsf.jar avalon-framework.jar batik.jar commons-io.jar commons-logging.jar xmlgraphics-commons.jar xml-commons-external.jar A "log.properties" file is now found in bsf.jar which is now in the classpath and found by log4j. You can find this by running fop 1:1.0.dfsg2-2 with -Dlog.debug : log4j: Using URL [jar:file:/usr/share/java/bsf.jar!/log4j.properties] for automatic log4j configuration. The FOP CLI behaviour should probably not depend on bsf logging configuration, it doesn't seem very robust. Moreover, the configuration from bsf.jar does not log warnings. Adding -Dorg.apache.commons.logging.Log=org.apache.fop.util.CommandLineLogger would use the default logger for fop CLI. -- Gabriel Corona -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#575411: fop: log4j not initialized correctly
tag 575411 moreinfo thanks For some reason I cannot reproduce this issue with latest fop from testing. Could someone double-check ? Thanks much -- Mathieu -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#575411: fop: log4j not initialized correctly
On 2011-07-11 15:42, Gabriel Corona wrote: > Hello, > > Shouldn't this be fixed in commons-logging ? > > Removing the classpath entry from MANIFEST-MF > (06_classpath_manifest.patch in commons-logging) > should fix the problem in applications. > Individual applications might want to add log4j in their > classpath to make their log4j.properties settings work. I have no idea how intrusive that fix would be on other applications. What the fop.sh patch does is ensure proper logging for FOP, and that's all I really intended to do. Florian signature.asc Description: OpenPGP digital signature
Bug#575411: fop: log4j not initialized correctly
Hello, Shouldn't this be fixed in commons-logging ? Removing the classpath entry from MANIFEST-MF (06_classpath_manifest.patch in commons-logging) should fix the problem in applications. Individual applications might want to add log4j in their classpath to make their log4j.properties settings work. As an added bonus it avoids loading lots of JAR for nothing in the JVM (servlet-api) and might event prevent problems. On my setup, running fop loads both servlet-api2.4 and servlet-api2.5. Can't this cause problems for example in an application using the servlet 2.5 API (in case the 2.4 is used by the classloader) or the 3.0 servlet API ? -- Gabriel -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#575411: fop: log4j not initialized correctly
clone 575411 -1 reassign -1 libbatik-java thanks Hi, On Fri, Jun 18, 2010 at 1:36 AM, Gabriel Corona wrote: > A quick fix is to add either : > -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog > or > -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger > in the last command of /usr/bin/fop : > run_java > -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog > $HEADLESS org.apache.fop.cli.Main "$@" [...] Many thanks; the problem is also present in batik (actually, I'm wonder if this isn't where the original problem is coming). I'll try to fix is relatively soon ;-)... Cheers, Vincent -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#575411: fop: log4j not initialized correctly
Hello, A quick fix is to add either : -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog or -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger in the last command of /usr/bin/fop : run_java -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog $HEADLESS org.apache.fop.cli.Main "$@" The longer answer is that according to http://commons.apache.org/logging/guide.html#Configuration the default loggin backend is log4j backend if it is found in the classpath. Otherwise, the default is to use the JDK 1.4 Logging backend. The default backend is overloaded with the org.apache.commons.logging.Log option. When using the log4j backend a log4j.properties is searched in the classpath. Otherwise the "No appenders could be found for logger" is displayed and the errors messages are not displayed. The reason log4j is found in the classpath is that it is in the classpath of the manifest of commons-loggin.jar. This is implemented by the patch 06_classpath_manifest.patch of the commons-logging package. So maybe the bug should belong to commons-logging instead ? One solution would be to add a log4j.properties files to fop or to explicitly change the backend with the org.apache.commons.logging.Log option (but the same problem may occur in other packages). Another solution is to remove the log4j package from the classpath of commons-logging manifest (I guess it should not break things). The good thing is that the backend selection process of commons-logging would select the JDK 1.4 backend unless log4js is explicitly in the classpath. I've never used commons-logging so parts of what I'm saying may not be accurate. -- Gabriel
Bug#575411: fop: log4j not initialized correctly
Package: fop Version: 1:0.95.dfsg-10 Severity: normal The following warnings occur every time I run fop: lakeview ok % fop -v 2>&1 | head -n 2 log4j:WARN No appenders could be found for logger (org.apache.fop.util.ContentHandlerFactoryRegistry). log4j:WARN Please initialize the log4j system properly. The errors occur whether I run fop through ant or at the command line. They occur with or without an XML configuration file. As demonstrated, these occur whether or not any data are actually being processed. If you need me to test something, please let me know. If you think this belongs to log4j, feel free to reassign it. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages fop depends on: ii default-jre-headless [jav 1.6-34 Standard Java or Java compatible R ii gcj-4.4-jre-headless [jav 4.4.3-5Java runtime environment using GIJ ii gcj-jre-headless [java2-r 4:4.4.3-1 Java runtime environment using GIJ ii gij-4.3 [java2-runtime-he 4.3.4-4The GNU Java bytecode interpreter ii java-wrappers 0.1.15 wrappers for java executables ii libavalon-framework-java 4.2.0-7Common framework for Java server a ii libbatik-java 1.7-6 xml.apache.org SVG Library ii libbsf-java 1:2.4.0-3 Bean Scripting Framework to suppor ii libcommons-io-java1.4-2 Common useful IO related classes ii libcommons-logging-java 1.1.1-7commmon wrapper interface for seve ii libxalan2-java2.7.1-5XSL Transformations (XSLT) process ii libxerces2-java 2.9.1-4.1 Validating XML parser for Java wit ii libxml-commons-external-j 1.3.05-2 XML Commons external code - DOM, S ii libxmlgraphics-commons-ja 1.3.1.dfsg-5 reusable components used by Batik ii libxp61:1.0.0.xsf1-2 X Printing Extension (Xprint) clie ii libxt61:1.0.7-1 X11 toolkit intrinsics library ii libxtst6 2:1.1.0-2 X11 Testing -- Resource extension ii openjdk-6-jre-headless [j 6b18~pre3-1OpenJDK Java runtime, using Hotspo Versions of packages fop recommends: ii libsaxon-java 1:6.5.5-6 The Saxon XSLT Processor Versions of packages fop suggests: ii fop-doc 1:0.95.dfsg-10 Documentation for fop ii libservlet2.4-java5.0.30-12 Servlet 2.4 and JSP 2.0 Java libra -- no debconf information -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187 signature.asc Description: Digital signature