logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaybytez <jayby...@gmail.com>
Subject log4j.ignoreTCL=true in XML Configuration File
Date Tue, 27 Nov 2007 18:11:03 GMT

I am running into an issue with log4j.jar for WebLogic and the application's
need for log4j-1.2.8.jar.  In WebLogic 9.2, the version of log4j is the same
as the one that is used within the application.  We have a class that
implements org.apache.log4j.spi.Configurator so that we could verify if the
log4j.xml file has changed so that it will be reloaded without restarting
the server.  In the startWebLogic.cmd that is run when starting the WebLogic
Server, the following lines are in the file:

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dlog4j.ignoreTCL=true
-Dlog4j.configuratorClass=com.foo.core.log.ReloadingDOMConfigurator
-Dlog4j.configuration=file://c:/development/workspace/foo/templates/log4j.sandbox.xml
set SAVE_JAVA_OPTIONS=

set CLASSPATH=%SAVE_CLASSPATH%;%DOMAIN_HOME%\lib\mylog4j.jar

The mylog4j.jar and the log4j-1.2.8.jar are located in the
<DOMAIN_HOME>\lib.  WebLogic puts log4j.jar in the classpath before my jars
when the server starts.

CLASSPATH=;C:\beaALSB\patch_weblogic921\profiles\default\sys_manifest_classpath\
weblogic_patch.jar;C:\beaALSB\JROCKI~1\lib\tools.jar;C:\beaALSB\WEBLOG~1\server\
lib\weblogic_sp.jar;C:\beaALSB\WEBLOG~1\server\lib\weblogic.jar;C:\beaALSB\WEBLO
G~1\server\lib\webservices.jar;;C:\beaALSB\WEBLOG~1\servicebus\L10N;C:\beaALSB\W
EBLOG~1\servicebus\lib\sb-public.jar;C:\beaALSB\WEBLOG~1\servicebus\lib\sb-commo
n.jar;C:\beaALSB\WEBLOG~1\servicebus\lib\sb-internal.jar;C:\beaALSB\WEBLOG~1\ser
vicebus\lib\sb-core.jar;C:\beaALSB\WEBLOG~1\integration\common\lib\mfl-common.ja
r;C:\beaALSB\WEBLOG~1\platform\lib\p13n\p13n_system.jar;C:\beaALSB\WEBLOG~1\comm
on\p13n\lib\p13n_common.jar;C:\beaALSB\WEBLOG~1\server\lib\wlxbean.jar;C:\beaALS
B\WEBLOG~1\server\lib\apachexmlbeansutil.jar;C:\beaALSB\WEBLOG~1\server\lib\xque
ry.jar;C:\beaALSB\WEBLOG~1\server\lib\binxml.jar;C:\beaALSB\WEBLOG~1\common\lib\
log4j.jar;C:\beaALSB\WEBLOG~1\servicebus\lib\uddi_library.jar;C:\beaALSB\WEBLOG~
1\servicebus\lib\uddi_client_v3.jar;C:\beaALSB\WEBLOG~1\servicebus\lib\version.j
ar;C:\beaALSB\WEBLOG~1\common\eval\pointbase\lib\pbembedded51.jar;C:\beaALSB\WEB
LOG~1\common\eval\pointbase\lib\pbupgrade51.jar;C:\beaALSB\WEBLOG~1\common\eval\
pointbase\lib\pbclient51.jar;C:\beaALSB\WEBLOG~1\server\lib\xqrl.jar;;C:\beaALSB
\WEBLOG~1\samples\domains\SERVIC~1\lib\mylog4j.jar;

The log4j logging works when the server is started, but an error is
generated when starting the server:

log4j:ERROR A "com.foo.core.log.ReloadingDOMConfigurator" object is not as
signable to a "org.apache.log4j.spi.Configurator" variable.
log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
log4j:ERROR [weblogic.utils.classloaders.GenericClassLoader@21ffc0b finder:
weblogic.utils.classloaders.CodeGenClassFinder@2e41486 annotation:
consoleapp@] whereas object of type
log4j:ERROR "com.foo.core.log.ReloadingDOMConfigurator" was loaded by
[sun.misc.Launcher$AppClassLoader@21652ec].
log4j:ERROR Could not instantiate configurator
[com.foo.core.log.ReloadingDOMConfigurator].
log4j:WARN No appenders could be found for logger
(org.apache.beehive.netui.page
flow.internal.AdapterManager).
log4j:WARN Please initialize the log4j system properly.

The documentation does not tell me much about this and I checked all the
forum postings.  I have tried multiple things such as removing
log4j-1.2.8.jar from the application classpath and such and this did not
change the message.  I saw an older posting about the system property
log4j.ignoreTCL=true. When I do this with the -Dlog4j.ignoreTCL=true option,
it does not work.  There is no real documentation on how to do this in the
log4j.xml.  Can this be done and if so, how?

Thanks for your help!
-- 
View this message in context: http://www.nabble.com/log4j.ignoreTCL%3Dtrue-in-XML-Configuration-File-tf4883466.html#a13976422
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message