Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
2.0.11, 2.2.1, 3.0-alpha-6, 3.0-alpha-7
-
None
-
None
-
OS: Windows XP SP 3
Tested Java Versions: jdk1.5.0_19, jdk1.6.0_18, jdk1.6.0_20_debug
Tested Maven Versions: 2.0.11, 2.1.0, 2.2.1, 3.0-alpha-7
Tested Plugins: org.mortbay.jetty:maven-jetty-plugin, org.codehaus.mojo:tomcat-maven-plugin, org.glassfish:maven-glassfish-plugin
Plugin dependencies:
org.slf4j:slf4j-api
org.slf4j:slf4j-log4j12
org.slf4j:jul-to-slf4j
org.slf4j:jcl-over-slf4jOS: Windows XP SP 3 Tested Java Versions: jdk1.5.0_19, jdk1.6.0_18, jdk1.6.0_20_debug Tested Maven Versions: 2.0.11, 2.1.0, 2.2.1, 3.0-alpha-7 Tested Plugins: org.mortbay.jetty:maven-jetty-plugin, org.codehaus.mojo:tomcat-maven-plugin, org.glassfish:maven-glassfish-plugin Plugin dependencies: org.slf4j:slf4j-api org.slf4j:slf4j-log4j12 org.slf4j:jul-to-slf4j org.slf4j:jcl-over-slf4j
Description
It seems that the classloader cannot find dependencies declared by Maven. After java.util.logging is parsed the logging handlers are inizialized lazy. The first call to java.util.logging.Logger.getLogger fails with a ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler
I added a sample project (jersey produces the JUL-Output) and the Maven-debug-output as attachment. I invoked maven with following command line:
mvn -X jetty:run -Djava.util.logging.config.file=.\src\main\resources\logging.properties -Dlog4j.configuration=file:.\src\main\resources\log4j.properties >maven.out 2>&1
The project deployed to a Tomcat with has the same slf4j-setup works fine.