java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

View: New views
13 Messages — Rating Filter:   Alert me  

java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On my bamboo server, which is running Sonar, I have each project using
its own local repository for maven
(-Dmaven.repo.local=/path/projectname). When it is empty, the first
time a build is done, I alway see the following:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/apache/maven/model/Reporting
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting
        at org.sonar.api.resources.DefaultProjectFileSystem.getReportOutputDir(DefaultProjectFileSystem.java:96)
        at org.sonar.plugins.cobertura.CoberturaSensor.getReportFromDefaultPath(CoberturaSensor.java:117)
        at org.sonar.plugins.cobertura.CoberturaSensor.getReport(CoberturaSensor.java:87)
        at org.sonar.plugins.cobertura.CoberturaSensor.analyse(CoberturaSensor.java:67)
        at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:53)
        at org.sonar.batch.Batch.executeJobs(Batch.java:91)
        at org.sonar.batch.Batch.analyse(Batch.java:79)
        at org.sonar.batch.Batch.start(Batch.java:54)
        at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:153)
        at org.sonar.batch.BatchMojo.execute(BatchMojo.java:145)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        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:585)
        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)

A manual build will fix the build, but I would rather not have to
manually build a project after it is created, or if I clear up the
local maven repository.

This is with Sonar 1.10.1.

-- Larry

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

    http://xircles.codehaus.org/manage_email



Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Larry,

FYI as you're using Bamboo, Ross Rowe has just released a first version of the Bamboo Sonar plugin [1].

I can't manage to understand why there is a difference when launching Sonar Maven goal automatically or manually. Do you know what is the special Maven configuration defined by Bamboo ?

Thanks

Freddy


[1] - http://jira.codehaus.org/browse/SONARPLUGINS-24
[1] - http://confluence.atlassian.com/display/CODEGEIST/Bamboo+Sonar+Plugin

On Tue, Sep 29, 2009 at 11:49 PM, Larry Shatzer, Jr. <larrys@...> wrote:
On my bamboo server, which is running Sonar, I have each project using
its own local repository for maven
(-Dmaven.repo.local=/path/projectname). When it is empty, the first
time a build is done, I alway see the following:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/apache/maven/model/Reporting
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting
       at org.sonar.api.resources.DefaultProjectFileSystem.getReportOutputDir(DefaultProjectFileSystem.java:96)
       at org.sonar.plugins.cobertura.CoberturaSensor.getReportFromDefaultPath(CoberturaSensor.java:117)
       at org.sonar.plugins.cobertura.CoberturaSensor.getReport(CoberturaSensor.java:87)
       at org.sonar.plugins.cobertura.CoberturaSensor.analyse(CoberturaSensor.java:67)
       at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:53)
       at org.sonar.batch.Batch.executeJobs(Batch.java:91)
       at org.sonar.batch.Batch.analyse(Batch.java:79)
       at org.sonar.batch.Batch.start(Batch.java:54)
       at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:153)
       at org.sonar.batch.BatchMojo.execute(BatchMojo.java:145)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
       at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
       at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
       at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
       at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
       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:585)
       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)

A manual build will fix the build, but I would rather not have to
manually build a project after it is created, or if I clear up the
local maven repository.

This is with Sonar 1.10.1.

-- Larry

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

   http://xircles.codehaus.org/manage_email




Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Sep 30, 2009 at 8:01 AM, Freddy Mallet <freddy.mallet@...> wrote:
> Hi Larry,
>
> FYI as you're using Bamboo, Ross Rowe has just released a first version of
> the Bamboo Sonar plugin [1].

Dang, someone beat me to a Bamboo Sonar plugin... ;) Good thing, as I
have little free time, but will try it out!

> I can't manage to understand why there is a difference when launching Sonar
> Maven goal automatically or manually. Do you know what is the special Maven
> configuration defined by Bamboo ?
>

I just ran it by hand, outside of bamboo, and got the same result.
Here is my full command line:

mvn -Dmaven.repo.local=/home/bamboo/.m2/bamboo/PROJECTNAME -e -U clean
deploy sonar:sonar -Psonar

-- Larry

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

    http://xircles.codehaus.org/manage_email



Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



I just ran it by hand, outside of bamboo, and got the same result.
Here is my full command line:

mvn -Dmaven.repo.local=/home/bamboo/.m2/bamboo/PROJECTNAME -e -U clean
deploy sonar:sonar -Psonar


Larry, in that case, it certainly means that the maven-model jar is corrupted in your  /home/bamboo/.m2/bamboo/PROJECTNAME private Maven repository. Could you try to delete the org/apache/maven/maven-model directory and relaunch a new Sonar analysis ?

Hope it helps,
Freddy


Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Sep 30, 2009 at 12:53 PM, Freddy Mallet <freddy.mallet@...> wrote:
>
> Larry, in that case, it certainly means that the maven-model jar is
> corrupted in your  /home/bamboo/.m2/bamboo/PROJECTNAME private Maven
> repository. Could you try to delete the org/apache/maven/maven-model
> directory and relaunch a new Sonar analysis ?

But if you read the original email, this happens with an empty .m2
repository. Nothing exists in it, so maven-model would not be there at
all. When I do another rebuild, it works (regardless of deleting
maven-model from the local repo). It is as if the first set of
dependency downloads does not gather all it needs to.

I just checked, and maven-model does not even have  jar in there, just
pom files.

/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0/maven-model-2.0.pom.sha1
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0/maven-model-2.0.pom
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.6
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.pom.sha1
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.pom
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.8
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.8/maven-model-2.0.8.pom.sha1
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.8/maven-model-2.0.8.pom
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.5
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.5/maven-model-2.0.5.pom.sha1
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.5/maven-model-2.0.5.pom
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.7
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.7/maven-model-2.0.7.pom.sha1
/home/bamboo/.m2/bamboo/PROJECTNAME/org/apache/maven/maven-model/2.0.7/maven-model-2.0.7.pom


I forgot to include the bit of output before the class not found
error, maybe this might help:

[INFO] Cobertura Report generation was successful.
[FATAL ERROR] org.sonar.batch.BatchMojo#execute() caused a linkage
error (java.lang.NoClassDefFoundError) and may be out-of-date. Check
the realms:
[FATAL ERROR] Plugin realm =
app0.child-container[org.codehaus.sonar.runtime:sonar-core-maven-plugin:20090901170506]
urls[0] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/sonar-core-maven-plugin/20090901170506/sonar-core-maven-plugin-20090901170506.jar
urls[1] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/sonar-plugin-api/1.10.1/sonar-plugin-api-1.10.1.jar
urls[2] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/ch/qos/logback/logback-classic/0.9.15/logback-classic-0.9.15.jar
urls[3] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/ch/qos/logback/logback-core/0.9.15/logback-core-0.9.15.jar
urls[4] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar
urls[5] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar
urls[6] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar
urls[7] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
urls[8] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar
urls[9] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
urls[10] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/antlr/antlr/2.7.6/antlr-2.7.6.jar
urls[11] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/cglib/cglib/2.1_3/cglib-2.1_3.jar
urls[12] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/asm/asm/1.5.3/asm-1.5.3.jar
urls[13] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar
urls[14] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga.jar
urls[15] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar
urls[16] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar
urls[17] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/hibernate/hibernate-entitymanager/3.3.1.ga/hibernate-entitymanager-3.3.1.ga.jar
urls[18] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/hibernate/hibernate-validator/3.0.0.ga/hibernate-validator-3.0.0.ga.jar
urls[19] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/jboss/javassist/3.3.ga/javassist-3.3.ga.jar
urls[20] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/jboss/jboss-common-core/2.0.4.GA/jboss-common-core-2.0.4.GA.jar
urls[21] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar
urls[22] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/com/google/collections/google-collections/1.0-rc2/google-collections-1.0-rc2.jar
urls[23] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/picocontainer/picocontainer/2.8.2/picocontainer-2.8.2.jar
urls[24] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar
urls[25] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-pool/commons-pool/1.3/commons-pool-1.3.jar
urls[26] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar
urls[27] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
urls[28] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-digester/commons-digester/1.8/commons-digester-1.8.jar
urls[29] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
urls[30] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar
urls[31] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-io/commons-io/1.4/commons-io-1.4.jar
urls[32] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
urls[33] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar
urls[34] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/jfree/jcommon/1.0.12/jcommon-1.0.12.jar
urls[35] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
urls[36] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/com/thoughtworks/xstream/xstream/1.3/xstream-1.3.jar
urls[37] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar
urls[38] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/woodstox/woodstox-core-lgpl/4.0.4/woodstox-core-lgpl-4.0.4.jar
urls[39] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/stax/stax-api/1.0.1/stax-api-1.0.1.jar
urls[40] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/woodstox/stax2-api/3.0.1/stax2-api-3.0.1.jar
urls[41] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/staxmate/staxmate/2.0.0/staxmate-2.0.0.jar
urls[42] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar
urls[43] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar
urls[44] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/xalan/xalan/2.7.1/xalan-2.7.1.jar
urls[45] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/xalan/serializer/2.7.1/serializer-2.7.1.jar
urls[46] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/checkstyle/checkstyle/4.4/checkstyle-4.4.jar
urls[47] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
urls[48] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/pmd/pmd/4.2.5/pmd-4.2.5.jar
urls[49] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/ant/ant/1.6/ant-1.6.jar
urls[50] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar
urls[51] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/jdom/jdom/1.0/jdom-1.0.jar
urls[52] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/xom/xom/1.0/xom-1.0.jar
urls[53] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar
urls[54] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/junit/junit/4.4/junit-4.4.jar
urls[55] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/jdbc-driver/parent/20090901170506/parent-20090901170506.pom
urls[56] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/jdbc-driver/mysql-connector-java-5.1.6/20090901170506/mysql-connector-java-5.1.6-20090901170506.jar
urls[57] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/parent/20090901170506/parent-20090901170506.pom
urls[58] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-taglist-0.5/20090901170506/sonar-plugin-taglist-0.5-20090901170506.jar
urls[59] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/technical-debt-0.3/20090901170506/technical-debt-0.3-20090901170506.jar
urls[60] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-cpd-1.10.1/20090901170506/sonar-plugin-cpd-1.10.1-20090901170506.jar
urls[61] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-squid-1.10.1/20090901170506/sonar-plugin-squid-1.10.1-20090901170506.jar
urls[62] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-checkstyle-1.10.1/20090901170506/sonar-plugin-checkstyle-1.10.1-20090901170506.jar
urls[63] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-core-1.10.1/20090901170506/sonar-plugin-core-1.10.1-20090901170506.jar
urls[64] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-googleanalytics-1.10.1/20090901170506/sonar-plugin-googleanalytics-1.10.1-20090901170506.jar
urls[65] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-clover-1.10.1/20090901170506/sonar-plugin-clover-1.10.1-20090901170506.jar
urls[66] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-surefire-1.10.1/20090901170506/sonar-plugin-surefire-1.10.1-20090901170506.jar
urls[67] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-cobertura-1.10.1/20090901170506/sonar-plugin-cobertura-1.10.1-20090901170506.jar
urls[68] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-pmd-1.10.1/20090901170506/sonar-plugin-pmd-1.10.1-20090901170506.jar
urls[69] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/plugins/sonar-plugin-findbugs-1.10.1/20090901170506/sonar-plugin-findbugs-1.10.1-20090901170506.jar
urls[70] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/sonar/runtime/rules-extensions/parent/20090901170506/parent-20090901170506.pom
urls[71] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/home/bamboo/maven/apache-maven-2.2.0/lib/maven-2.2.0-uber.jar
[WARNING] Component manager not found for returned component. Ignored.
component=org.sonar.batch.BatchMojo@1c98360
[FATAL ERROR] org.codehaus.mojo.sonar.SonarMojo#execute() caused a
linkage error (java.lang.NoClassDefFoundError) and may be out-of-date.
Check the realms:
[FATAL ERROR] Plugin realm =
app0.child-container[org.codehaus.mojo:sonar-maven-plugin:1.0-beta-1]
urls[0] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/mojo/sonar-maven-plugin/1.0-beta-1/sonar-maven-plugin-1.0-beta-1.jar
urls[1] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-io/commons-io/1.3/commons-io-1.3.jar
urls[2] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
urls[3] = file:/home/bamboo/.m2/bamboo/PROJECTNAME/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/home/bamboo/maven/apache-maven-2.2.0/lib/maven-2.2.0-uber.jar
[WARNING] Component manager not found for returned component. Ignored.
component=org.codehaus.mojo.sonar.SonarMojo@ed3007

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

    http://xircles.codehaus.org/manage_email



Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I tried to dig into this today, and I can't reproduce it. I'm not sure
what changed, but if it happens again, and I'm able to reproduce it,
I'll try to dig deeper into it.

Sorry for any noise...

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

    http://xircles.codehaus.org/manage_email



Re: Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok Larry, thanks for this notification !

On Thu, Oct 1, 2009 at 9:55 PM, Larry Shatzer, Jr. <larrys@...> wrote:
I tried to dig into this today, and I can't reproduce it. I'm not sure
what changed, but if it happens again, and I'm able to reproduce it,
I'll try to dig deeper into it.

Sorry for any noise...

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

   http://xircles.codehaus.org/manage_email




Re: Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm starting to see this on a more regular basis, and now on builds
that already have their m2 directory populated. I'm going to see if I
can debug this a bit more and dig into it.

On Fri, Oct 2, 2009 at 1:28 AM, Freddy Mallet <freddy.mallet@...> wrote:

> Ok Larry, thanks for this notification !
>
> On Thu, Oct 1, 2009 at 9:55 PM, Larry Shatzer, Jr. <larrys@...> wrote:
>>
>> I tried to dig into this today, and I can't reproduce it. I'm not sure
>> what changed, but if it happens again, and I'm able to reproduce it,
>> I'll try to dig deeper into it.
>>
>> Sorry for any noise...
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>

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

    http://xircles.codehaus.org/manage_email



Re: Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 15, 2009 at 8:16 AM, Larry Shatzer, Jr. <larrys@...> wrote:
> I'm starting to see this on a more regular basis, and now on builds
> that already have their m2 directory populated. I'm going to see if I
> can debug this a bit more and dig into it.

Looking at the sonar maven plugin, it defines maven-model as provided.
The class that can't be found: "org/apache/maven/model/Reporting"
exists in apache-maven-2.2.1/lib/maven-2.2.1-uber.jar

This happens with both Java 5 and Java 6.

I've also tried Maven 2.2.0 and Maven 2.2.1, both exhibit this behavior as well.

I've not tried upgrading to Sonar 1.11 from 1.10.1 yet.

Is there anything else I can provide, or look at to help?

-- Larry

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

    http://xircles.codehaus.org/manage_email



Re: Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Larry,

I've created SONAR-1212 [1] and your suggestion seems pretty good : removing the "provided" scopes in the Mojo sonar-maven-plugin.

regards,
Freddy


[1] - http://jira.codehaus.org/browse/SONAR-1212


On Thu, Oct 15, 2009 at 7:29 PM, Larry Shatzer, Jr. <larrys@...> wrote:
On Thu, Oct 15, 2009 at 8:16 AM, Larry Shatzer, Jr. <larrys@...> wrote:
> I'm starting to see this on a more regular basis, and now on builds
> that already have their m2 directory populated. I'm going to see if I
> can debug this a bit more and dig into it.

Looking at the sonar maven plugin, it defines maven-model as provided.
The class that can't be found: "org/apache/maven/model/Reporting"
exists in apache-maven-2.2.1/lib/maven-2.2.1-uber.jar

This happens with both Java 5 and Java 6.

I've also tried Maven 2.2.0 and Maven 2.2.1, both exhibit this behavior as well.

I've not tried upgrading to Sonar 1.11 from 1.10.1 yet.

Is there anything else I can provide, or look at to help?

-- Larry

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

   http://xircles.codehaus.org/manage_email




Re: Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Simon Brandhof-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys,

From Benjamin Bentmann point of view, changing the scope of maven dependencies does not fix the problem [1]. Moreover I can't reproduce the issue with Maven 2.2.0/2.2.1, Java 5/6 and Sonar 1.10/1.11 when setting the parameter -Dmaven.repo.local=/path/to/empty/dir

Larry, do you have the issue on all your projects ? Could you send a sample of pom please ?

Regards,
Simon

[1] http://jira.codehaus.org/browse/MOJO-1450


Re: Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, all my projects exhibit it. I'll see if I can find a simple pom
that does not have my companies corporate pom in it that experiences
it. They are fairly simple poms (pretty much just dependencies, and a
few simple configs, no reporting being run, or other stuff). I planned
on today trying to remove various things to narrow it down. Such as
take Nexus out of the equation, and have a simple pom that did not
have a parent pom, nor any dependencies.

On Thu, Nov 5, 2009 at 5:41 AM, Simon Brandhof <simon.brandhof@...> wrote:

> Hi guys,
>
> From Benjamin Bentmann point of view, changing the scope of maven
> dependencies does not fix the problem [1]. Moreover I can't reproduce the
> issue with Maven 2.2.0/2.2.1, Java 5/6 and Sonar 1.10/1.11 when setting the
> parameter -Dmaven.repo.local=/path/to/empty/dir
>
> Larry, do you have the issue on all your projects ? Could you send a sample
> of pom please ?
>
> Regards,
> Simon
>
> [1] http://jira.codehaus.org/browse/MOJO-1450
>
>

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

    http://xircles.codehaus.org/manage_email



Re: Re: java.lang.NoClassDefFoundError: org/apache/maven/model/Reporting with empty local maven repository

by Larry Shatzer, Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 5, 2009 at 6:18 AM, Larry Shatzer, Jr. <larrys@...> wrote:
> Yes, all my projects exhibit it. I'll see if I can find a simple pom
> that does not have my companies corporate pom in it that experiences
> it. They are fairly simple poms (pretty much just dependencies, and a
> few simple configs, no reporting being run, or other stuff). I planned
> on today trying to remove various things to narrow it down. Such as
> take Nexus out of the equation, and have a simple pom that did not
> have a parent pom, nor any dependencies.

I have eliminated Nexus (at least from having it proxy Sonar for its
plugins) with a <mirrorOf>*,!sonar</mirrorOf> and adding a mirror with
an id of sonar set to the sonar instance. I saw it download the sonar
stuff from the sonar instance in the output.

While trying something else unrelated, I got this stack trace: (added
a clirr report, and ran a site generation)

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/apache/maven/artifact/versioning/VersionRange
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError:
org/apache/maven/artifact/versioning/VersionRange
        at org.codehaus.mojo.clirr.AbstractClirrMojo.getComparisonArtifact(AbstractClirrMojo.java:408)
        at org.codehaus.mojo.clirr.AbstractClirrMojo.canGenerate(AbstractClirrMojo.java:577)
        at org.codehaus.mojo.clirr.ClirrReport.canGenerateReport(ClirrReport.java:342)
        at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.filterReports(AbstractSiteRenderingMojo.java:177)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:81)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        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:585)
        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)

A second run fixed it. It looks like it might not be related to Sonar,
but something else.

I just tried to replicate it on another box, (and various versions of
maven from 2.0.10 up to latest)... On the bamboo box, it always fails,
while the other box it works fine.

Both are running "1.5.0_09" of java (I have replicated this with never
versions of java as well)

Bamboo box is Red Hat Enterprise Linux Server release 5.2 (Tikanga)

The working box is Red Hat Enterprise Linux AS release 4 (Nahant Update 3)

Both are a VM on vmware.

I am puzzled even more now...

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

    http://xircles.codehaus.org/manage_email