I've been trying to use Log4J to log error- and debug-messages from some BIRT scripted datasources used by reports we want to run in Pentaho. However, no matter what I do to try configuring Log4J (editing either pentaho.war/WEB-INF/classes/log4j.xml or jboss/server/default/conf/jboss-log4j.xml) nothing that my classes send there gets printed. Instead, I get the following message when a report is run:

11:16:10,032 ERROR [STDERR] log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.
11:16:10,032 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by 
11:16:10,032 ERROR [STDERR] log4j:ERROR [java.net.URLClassLoader@163e085] whereas object of type 
11:16:10,032 ERROR [STDERR] log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [org.jboss.mx.loading.UnifiedClassLoader3@5fa11b{ url=file:/opt/pentaho-demo7/jboss/server/default/deploy/pentaho.war/ ,addedOrder=78}].
11:16:10,032 ERROR [STDERR] log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
11:16:10,037 ERROR [STDERR] log4j:WARN No appenders could be found for logger (com.bmtcarhaul.reports.datasource.StandingAndTransitTime).
11:16:10,037 ERROR [STDERR] log4j:WARN Please initialize the log4j system properly.
The reports can run to completion in spite of this message; and if I print to System.out, the output ends up in the JBoss log-file. However, it seems wasteful to have to write my own log() function. Has anyone gotten Log4J or java.util.logging to work from within a BIRT scripted datasource running in Pentaho?