Hi,

James Stauffer wrote:
Is it possibly a classloader issue?  It could be that the JDBC driver
is loaded by the same classloader as the class that generates the
config file but by a different class loader that the code the
configures log4j.

We tried to track the problem down, and I am currently stuck.
I also already thought about a classloader issue, but I can not
imagine how this should happen in this case. We used a simple
test class:

import org.apache.log4j.*;
import org.apache.log4j.xml.*;

public class LogTest {
  public static void main(String[] args) {
    DOMConfigurator.configure("log4j.xml");
    Logger.getLogger("system.system").debug("Application initialized.");
  }
}

We started it with the following .cmd file:

SET JAVA_HOME=C:\Programme\Java\jdk1.4.2
dir
echo %CLASSPATH%
%JAVA_HOME%\bin\javac -classpath .;log4j-1.2.9.jar LogTest.java
%JAVA_HOME%\bin\java -verbose:class -cp .;log4j-1.2.9.jar;mysql-connector-java-3.1.8-bin.jar LogTest

The only difference between my environment and Raouls environment
is the JVM: Raoul uses the JDK from Jdeveloper (a 1.4.2_04-b05),
and I use the original SUN JDK (a 1.4.2_08-b03).
The output shows no additional CLASSPATH set in our both environments.
The log4j.xml is the same, Raoul sent me his version (I though about
illegal invisible characters in the Driver= attribute, but that seems
to be ok).

BUT: Raoul gets the ClassNotFoundException, whereas in my case the
mysql driver is properly loaded. I only get a ClassNotFoundException
if I mess with the -cp parameter.... So I think we are thankful for
all additional input :-)

Thanks,
        Andreas


On 6/6/05, Raoul OPPLIGER <[EMAIL PROTECTED]> wrote:

Hi Andreas

For your information:
       operating system:       windows XP
       java:                   1.4.2_04
       log4j:          logging-log4j-1.2.9

I don't really understand why there's a problem with the CLASSPATH
because I use the database to construct the configuration file.
[...]

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

Reply via email to