José Antonio Pérez Testa wrote:

I have to set the property when deploying in a tomcat 4.1 with JDK 1.4.
My application ear includes commons-logging and log4j jars in its lib directory.
Tomcat lib directory also includes commons-logging.jar
Unfortunately commons-logging was unable to find any logger other than jdk 1.4 logger.
Configuring that property ( although in a deprecated way, as you point :( ) brought my log4j logs back again!
I think that was also a classloader issue!


More likely you're not using the right version of commons-logging (a *critically* important detail in reporting problems is what version of the software you are actually using). Version 1.0.3 is current, and was released precisely to deal with class loading issues.

That being said, Log4JCategoryLog is deprecated, and not being maintained. You're just asking for other kinds of trouble by continuing to use it. You should really be using "org.apache.commons.logging.impl.Log4JLogger" instead.

Craig



Thanks all!


Craig R. McClanahan wrote:

José Antonio Pérez Testa wrote:

Try defining the property explicitly:

java -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog foo.bar.yourClass




While you can certainly set properties like this, the particular class you propose here (Log4JCategoryLog) has been deprecated. You should be using Log4JLogger if you're logging with Log4J -- but, commons-logging will select that for you automatically if Log4J is in the class path, so you should not need to configure it.



in the java launcher!



Craig




Victor Batista wrote:

Hello!
I am having some problems using Commons-Logging. I think this is a class
loading issue. Any help would be welcome.


When I run my program, which uses commons-logging indirectly (My program
uses the Quartz package, which uses commons-logging), everything works fine
on Windows and Linux (7.2 & 9.0). Now I have developed a watchdog module,
and my application is launched through it. The Watchdog uses the
Class.forName(...) to create the instance of my original application. With
this combination, I get the exception which is at the end of the email, only
on RedHat 9.0 (On Windows and RedHat 7.2 everityhing works fine). I have
tried with J2SDK 1.4.1, 1.4.2 and 1.4.2_01.


    Any help would be really appreciated. Thanks in advance,
        Victor Batista


* Nested Exception (Underlying Cause) ---------------
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558)
at
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:355)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
at org.quartz.core.QuartzScheduler.getLog(QuartzScheduler.java:188)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-------------------------------------------------------------------------------------------------------------------


Este correo electrsnico y, en su caso, cualquier fichero anexo al mismo, contiene informacisn de caracter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgacisn, copia o distribucisn a terceros sin la previa autorizacisn escrita de Indra. En el caso de haber recibido este correo electrsnico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvmo a la direccisn electrsnica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-------------------------------------------------------------------------------------------------------------------


Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to