[ 
http://jira.codehaus.org/browse/MOJO-1101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133122#action_133122
 ] 

Maksim Kaszynski commented on MOJO-1101:
----------------------------------------

David, 
Your work-around does work. 

> Dashboard plugin gives error in Maven 2.0.9 on commons-logging
> --------------------------------------------------------------
>
>                 Key: MOJO-1101
>                 URL: http://jira.codehaus.org/browse/MOJO-1101
>             Project: Mojo
>          Issue Type: Bug
>          Components: dashboard
>         Environment: Windows XP, Linux , SUN & IBM 1.4.2 JVMs
>            Reporter: Duncan Doyle
>            Assignee: David Vicente
>            Priority: Blocker
>
> With the new Maven 2.0.9 the Dashboard plugin throws the following exception.
> [ERROR] FATAL ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] null
> Invalid class loader hierarchy.  You have more than one version of 
> 'org.apache.commons.logging.Log' visible, which is not allowed.
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.ExceptionInInitializerError
>         at 
> org.codehaus.mojo.dashboard.report.plugin.hibernate.HibernateServiceImpl.initialize(HibernateServiceImpl.java:116)
>         at 
> org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase.execute(InitializePhase.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java(Inlined
>  Compiled Code))
>         at 
> org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:129)
>         at 
> org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73)
>         at 
> org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java(Inlined
>  Compiled Code))
>         at 
> org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95)
>         at 
> org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(PerLookupComponentManager.java:48)
>         at 
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java(Compiled
>  Code))
>         at 
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java(Compiled
>  Code))
>         at 
> org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:609)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.getReport(DefaultPluginManager.java:542)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.getReports(DefaultLifecycleExecutor.java:711)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.getReports(DefaultLifecycleExecutor.java:661)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:536)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
>         at java.lang.reflect.Method.invoke(Method.java:391)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at 
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.commons.logging.LogConfigurationException: 
> org.apache.commons.logging.LogConfigurationException: 
> org.apache.commons.logging.LogConfigurationExce
> ption: Invalid class loader hierarchy.  You have more than one version of 
> 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by 
> org.apache.common
> s.logging.LogConfigurationException: Invalid class loader hierarchy.  You 
> have more than one version of 'org.apache.commons.logging.Log' visible, which 
> is not allowed
> .) (Caused by org.apache.commons.logging.LogConfigurationException: 
> org.apache.commons.logging.LogConfigurationException: Invalid class loader 
> hierarchy.  You have mo
> re than one version of 'org.apache.commons.logging.Log' visible, which is not 
> allowed. (Caused by org.apache.commons.logging.LogConfigurationException: 
> Invalid class
> loader hierarchy.  You have more than one version of 
> 'org.apache.commons.logging.Log' visible, which is not allowed.))
>         at 
> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
>         at 
> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
>         at 
> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
>         at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
>         at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:120)
>         ... 40 more
> Caused by: org.apache.commons.logging.LogConfigurationException: 
> org.apache.commons.logging.LogConfigurationException: Invalid class loader 
> hierarchy.  You have more
> than one version of 'org.apache.commons.logging.Log' visible, which is not 
> allowed. (Caused by org.apache.commons.logging.LogConfigurationException: 
> Invalid class loa
> der hierarchy.  You have more than one version of 
> 'org.apache.commons.logging.Log' visible, which is not allowed.)
>         at 
> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
>         at 
> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
>         ... 44 more
> Caused by: org.apache.commons.logging.LogConfigurationException: Invalid 
> class loader hierarchy.  You have more than one version of 
> 'org.apache.commons.logging.Log' v
> isible, which is not allowed.
>         at 
> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
>         ... 45 more
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 32 seconds
> [INFO] Finished at: Tue Apr 22 11:01:43 CEST 2008
> [INFO] Final Memory: 41M/69M
> [INFO] 
> ------------------------------------------------------------------------
> This issue might be due to this change in Maven, although I haven't 
> investigated this fully:
> MNG-1412 / MNG-3111 introduced deterministic ordering of dependencies on the 
> classpath. In the past, natural set ordering was used and this lead to odd 
> results. The ordering is now preserved from your pom, with dependencies added 
> by inheritence added last. In builds that had conflicting or duplicate 
> dependencies, this may introduce a change to the output. In short, if you 
> have weird issues with 2.0.9, take a look at the dependencies to see if you 
> have conflicts somewhere.
> This issue can be fixed by excluding the transitive commons-logging (1.0.4) 
> dependency from the hibernate dependency and introducing a new dependency on 
> commons-logging 1.1. I however don't exactly know why this works. This 
> exception looks like there are 2 conflicting commons-logging JARs on the 
> classpath, however, when I exclude the commons-logging from hibernate, there 
> is no commons-logging jar at all on the classpath (NoClassDefFoundError). So 
> it seems that there is only one commons-logging JAR included via a transitive 
> dependency, so I don't understand where this error comes from.
> This error does not occur in Maven 2.0.7 though.

-- 
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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to