[logback-user] Unable to Initialize Logger in JDK1.4
Brian Suksomwong
bhmtdragon at gmail.com
Fri Apr 27 06:57:08 CEST 2007
Hey all,
I'm trying to test logback's JDK1.4 support, but am receiving a
NoClassDefNotFoundException when running my test class.
Test Class:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public Test {
public static void main(String args[]) {
Logger log = LoggerFactory.getLogger(Test.class);
System.out.prinln(log.getName());
}
}
My classpath includes:
logback-classic-0.9.5-jdk14.jar
logback-core-0.9.5-jdk14.jar
slf4j-api-1.3.0.jar
slf4j-jdk14-1.3.0.jar (just in case, but I receive the same error without
it)
When I try to run the class I receive the following stack trace:
java.lang.NoClassDefFoundError: javax/management/ObjectName
at ch.qos.logback.classic.joran.JoranConfigurator.addInstanceRules(
JoranConfigurator.java:62)
at ch.qos.logback.core.joran.GenericConfigurator.buildInterpreter(
GenericConfigurator.java:83)
at ch.qos.logback.core.joran.JoranConfiguratorBase.buildInterpreter(
JoranConfiguratorBase.java:82)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(
GenericConfigurator.java:95)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(
GenericConfigurator.java:74)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(
GenericConfigurator.java:38)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(
ContextInitializer.java:24)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(
ContextInitializer.java:35)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(
ContextInitializer.java:46)
at org.slf4j.impl.StaticLoggerBinder.initialize(StaticLoggerBinder.java:52)
at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:44)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:39)
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:57)
at Test.main(Test.java:6)
... Removed 21 stack frames
The javax/management package is not in JDK1.4, but is in JDK1.5. I think
there is a binding issue happening; please help me solve this issue if
possible.
Thanks!
-B-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20070426/bb5f8c10/attachment.htm
More information about the Logback-user
mailing list