Mojo

You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: dashboard
  • Labels:
    None
  • Environment:
    Maven version: 2.0.9
    Java version: 1.6.0_02
    OS name: "linux" version: "2.6.21.7-3.fc8" arch: "i386" Family: "unix"
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

For all projects I have tried I get the error "Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.". (See full stacktrace at the bottom.)
I get the same error on projects that don't use commons-logging directly, but there is still a chance that other plugins depend on commons-logging.

The plugin depends on commons-logging version 1.0.4. Could this dependency be upgraded to 1.1.1?
Version 1.1.1 solves many of the problems people have with commons-logging. E.g. more dependencies are optional.

Is it anything I can do to fix this error?
(I have tried to lock down commons-logging in dependencyManagement, but that didn't seem to make any difference.)

[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:16)
at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101)
at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95)
at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
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:68)
at org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486)
at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29)
at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101)
at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105)
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:331)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:609)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:429)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.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 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 more 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)
... 37 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 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.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 41 more
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.getLogConstructor(LogFactoryImpl.java:385)
... 42 more

Issue Links

Activity

Hide
David Vicente added a comment -

See the solution that i've proposed in issue MOJO-1101 :

i've read this article : http://blogs.sonatype.com/brian/2008/04/23/1208965980000.html

Could you make a test with this configuration in the <build> section

<!-- Dashboard -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dashboard-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<dialect>${org.hibernate.dialect}</dialect>
<driverClass>${org.hibernate.connection.driverclass}</driverClass>
<connectionUrl>${org.hibernate.connection.connectionurl}</connectionUrl>
<username>${org.hibernate.connection.username}</username>
<password>${org.hibernate.connection.password}</password>
<keepVersionAsDiscriminantCriteria>false</keepVersionAsDiscriminantCriteria>

</configuration>
<dependencies>
<dependency>
<!-- HSQLDB Jdbc Driver -->
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.9</version>
</dependency>
<dependency>
<!-- to override commons-logging in Hibernate library dependancy -->
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>

keep me in touch

Best regards

David

Show
David Vicente added a comment - See the solution that i've proposed in issue MOJO-1101 : i've read this article : http://blogs.sonatype.com/brian/2008/04/23/1208965980000.html Could you make a test with this configuration in the <build> section <!-- Dashboard --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>dashboard-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <configuration> <dialect>${org.hibernate.dialect}</dialect> <driverClass>${org.hibernate.connection.driverclass}</driverClass> <connectionUrl>${org.hibernate.connection.connectionurl}</connectionUrl> <username>${org.hibernate.connection.username}</username> <password>${org.hibernate.connection.password}</password> <keepVersionAsDiscriminantCriteria>false</keepVersionAsDiscriminantCriteria> </configuration> <dependencies> <dependency> <!-- HSQLDB Jdbc Driver --> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>1.8.0.9</version> </dependency> <dependency> <!-- to override commons-logging in Hibernate library dependancy --> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1</version> </dependency> </dependencies> </plugin> keep me in touch Best regards David
Hide
David Vicente added a comment -

Any news ?

Show
David Vicente added a comment - Any news ?
Hide
David Vicente added a comment -

duplicates MOJO-1101 and a solution has been found

Show
David Vicente added a comment - duplicates MOJO-1101 and a solution has been found

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: