[ 
http://jira.codehaus.org/browse/MNG-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann closed MNG-4606.
----------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

>From your log output:
bq.     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

>From the source of java.util.logging.LogManager.java:910
bq. Class clz = ClassLoader.getSystemClassLoader().loadClass(word);

JUL tries to load classes from the system class loader and not from say the 
thread context class loader.

> Plugin dependencies are not available for initialization java.util.logging
> --------------------------------------------------------------------------
>
>                 Key: MNG-4606
>                 URL: http://jira.codehaus.org/browse/MNG-4606
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Class Loading, Dependencies
>    Affects Versions: 2.0.11, 2.2.1, 3.0-alpha-6, 3.0-alpha-7
>         Environment: 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-slf4j
>            Reporter: Johannes Barop
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>         Attachments: maven.out, rest-demo.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to