log4j exception

Debian bug: bug

log4j:WARN No appenders could be found for logger (org.apache.fop.util.ContentHandlerFactoryRegistry).
log4j:WARN Please initialize the log4j system properly.

Solution:
Add this before "fop" command
JAVA_ARGS=-Dlog4j.configuration=file:///some/directory/log4j.properties 

Exemple:
JAVA_ARGS=-Dlog4j.configuration=file:///some/directory/log4j.properties \
 fop -c fop_config.xml -fo /tmp/FOPxlF8B8 -pdf /tmp/FOPxlF8B8.pdf 2>&1

Add this in /some/directory/log4j.properties file:
log4j.rootLogger = INFO, console

log4j.appender.console = org.apache.log4j.ConsoleAppender

log4j.appender.console.layout = org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern = %d [%t] %-5p %c{1} - %m%n

# This sets all FOP logging to INFO. Only output from the renderers is logged on the DEBUG level.
log4j.logger.org.apache.fop = INFO
log4j.logger.org.apache.fop.render = DEBUG

Source: fop перестал выдавать сообщения в консоль
Source de la configuration: Setup Log4J Logging

Errors:

	
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xmlgraphics.util.Service.providerNames(Ljava/lang/Class;)Ljava/util/Iterator;
	at org.apache.fop.fo.ElementMappingRegistry.setupDefaultMappings(ElementMappingRegistry.java:74)
	at org.apache.fop.fo.ElementMappingRegistry.<init>(ElementMappingRegistry.java:66)
	at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:166)
	at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:190)
	at org.apache.fop.cli.CommandLineOptions.<init>(CommandLineOptions.java:124)
	at org.apache.fop.cli.Main.startFOP(Main.java:160)
	at org.apache.fop.cli.Main.main(Main.java:208)

apt-get install libxmlgraphics-commons-java