Problem when building sonar 1.5M1

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem when building sonar 1.5M1

baboune
Hi,

I've upgraded my continous integration server (hudson) from Sonar 1.4.2 to Sonar 1.5M1, but my build fails on "prepare" cycle :

[ERROR] Cannot execute the command org.codehaus.sonar:sonar-core-maven-plugin:1.5M1:prepare
java.lang.AbstractMethodError: org.sonar.plugins.pmd.PmdPlugin.getExtensions()Ljava/util/List;
        at org.sonar.plugins.api.Plugins.introspectExtensions(Plugins.java:73)
        at org.sonar.plugins.api.Plugins.<init>(Plugins.java:42)
        at org.sonar.maven.MavenContainer.<init>(MavenContainer.java:51)
        at ch.hortis.sonar.mvn.CoreMojo.getContainer(CoreMojo.java:210)
        at ch.hortis.sonar.mvn.PrepareMojo.doExecute(PrepareMojo.java:35)
        at ch.hortis.sonar.mvn.CoreMojo.execute(CoreMojo.java:118)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        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 ch.hortis.sonar.mvn.SonarMavenEmbedder.execute(SonarMavenEmbedder.java:151)
        at ch.hortis.sonar.mvn.SonarMojo.executeMaven(SonarMojo.java:301)
        at ch.hortis.sonar.mvn.SonarMojo.executeGoals(SonarMojo.java:284)
        at ch.hortis.sonar.mvn.SonarMojo.execute(SonarMojo.java:134)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        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:227)
        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: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)

Any idea on how to solve this problem ?

Thx
Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

Simon Brandhof
Hi Baboune,

Which maven version do you use ?

Simon

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

baboune
Hi Simon, thx for your quick response

We use maven 2.0.9
Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

Simon Brandhof-2
Baboune, could you attach your pom.xml and target/sonar/sonar-pom.xml please ? If it contains confidential data, you can email them directly at simon.brandhof AT codehaus.org

Thanks

On Thu, Nov 20, 2008 at 5:19 PM, baboune <[hidden email]> wrote:

Hi Simon, thx for your quick response

We use maven 2.0.9

Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

gwalters
I'm not sure if this is useful information, but I'm seeing exactly the same error (with the same versions of Sonar and Maven), preceded by this:

[ERROR] ch.hortis.sonar.mvn.PrepareMojo#execute() caused a linkage error (java.lang.AbstractMethodError) and may be out-of-date. Check the realms:
[ERROR] Plugin realm = app0.child-container[org.codehaus.sonar:sonar-core-maven-plugin]
...
[ERROR] Container realm = plexus.core
...

Simon Brandhof wrote
Baboune, could you attach your pom.xml and target/sonar/sonar-pom.xml please
? If it contains confidential data, you can email them directly at
simon.brandhof AT codehaus.org

Thanks

On Thu, Nov 20, 2008 at 5:19 PM, baboune <bab0une@gmail.com> wrote:

>
> Hi Simon, thx for your quick response
>
> We use maven 2.0.9
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

Freddy Mallet SonarSource
Hello,

This error can occur when you use both maven sonar plugin version 1.4 and version 1.5 on the same machine. Indeed, in that case your local maven repository is synchronized with both Sonar Maven SNAPSHOT Repositories exposed by your sonar web instances (accessible at http://yourmachine:yourport/sonar/deploy/maven) and there can be some kind of conflicts (this limitation will be solved in version 1.6 : SONAR-479).

Could you try to simply restart your sonar web instance (version 1.5) and launch again the maven sonar plugin.
This should be fix your issue.

Regards,
Freddy

On Tue, Dec 9, 2008 at 6:46 PM, gwalters <[hidden email]> wrote:

I'm not sure if this is useful information, but I'm seeing exactly the same
error (with the same versions of Sonar and Maven), preceded by this:

[ERROR] ch.hortis.sonar.mvn.PrepareMojo#execute() caused a linkage error
(java.lang.AbstractMethodError) and may be out-of-date. Check the realms:
[ERROR] Plugin realm =
app0.child-container[org.codehaus.sonar:sonar-core-maven-plugin]
...
[ERROR] Container realm = plexus.core
...


Simon Brandhof wrote:
>
> Baboune, could you attach your pom.xml and target/sonar/sonar-pom.xml
> please
> ? If it contains confidential data, you can email them directly at
> simon.brandhof AT codehaus.org
>
> Thanks
>
> On Thu, Nov 20, 2008 at 5:19 PM, baboune <[hidden email]> wrote:
>
>>
>> Hi Simon, thx for your quick response
>>
>> We use maven 2.0.9
>>
>
>

--
View this message in context: http://www.nabble.com/Problem-when-building-sonar-1.5M1-tp20604517p20919767.html
Sent from the Sonar mailing list archive at Nabble.com.


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

   http://xircles.codehaus.org/manage_email





--
Freddy Mallet
SonarSource S.A.

Sonar , embrace Quality
http://sonar.codehaus.org
Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

gwalters
Hi Freddy,

Thanks for the suggestion, but unfortunately I still get the same error after restarting sonar.

I have also tried clearing out both versions of the plugin from the maven cache, and re-creating the nexus proxy to the sonar internal maven repository.
Only the 1.5RC1 version of the plugin is being downloaded, but the sonar runtime dependencies are no longer being found.

I thought it was possible to check for the presence of the sonar internal maven repository on <a href="http://host:port/sonar/maven/README">http://host:port/sonar/maven/README, but this doesn't seem to work.  I have also tried the url you mentioned: <a href="http://host:port/sonar/deploy/maven">http://host:port/sonar/deploy/maven (and README), but still no luck.

Now I'm wondering whether this was ever working with 1.5RC1 because I've just noticed warnings like these before the original exception in the log:

[INFO] snapshot org.codehaus.sonar.runtime:jdbc-driver:1.0-SNAPSHOT: checking for updates from internal
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for org/codehaus/sonar/runtime/jdbc-driver/1.0-SNAPSHOT/maven-metadata.xml - IGNORING
[INFO] snapshot org.codehaus.sonar.runtime:jdbc-driver:1.0-SNAPSHOT: checking for updates from sonar
[INFO] snapshot org.codehaus.sonar.runtime.jdbc-driver:jdbc-driver_ext_0:1.0-SNAPSHOT: checking for updates from internal
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for org/codehaus/sonar/runtime/jdbc-driver/jdbc-driver_ext_0/1.0-SNAPSHOT/maven-metadata.xml - IGNORING
[INFO] snapshot org.codehaus.sonar.runtime.jdbc-driver:jdbc-driver_ext_0:1.0-SNAPSHOT: checking for updates from sonar

Perhaps I should just wait for the next version, but I would be grateful for any ideas.

Regards,
Geoff
Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

gwalters
I've just tried using <mirrorOf>*,!sonar</mirrorOf> in the maven settings.xml instead of a nexus proxy.
The runtime dependencies are now found and the original problem has gone away.
Restarting sonar must have worked after all.

Thanks for your help.

Geoff
Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

Freddy Mallet SonarSource
Well done Geoff !

On Thu, Dec 11, 2008 at 10:59 AM, gwalters <[hidden email]> wrote:

I've just tried using <mirrorOf>*,!sonar</mirrorOf> in the maven settings.xml
instead of a nexus proxy.
The runtime dependencies are now found and the original problem has gone
away.
Restarting sonar must have worked after all.

Thanks for your help.

Geoff
--
View this message in context: http://www.nabble.com/Problem-when-building-sonar-1.5M1-tp20604517p20952551.html
Sent from the Sonar mailing list archive at Nabble.com.


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

   http://xircles.codehaus.org/manage_email





--
Freddy Mallet
SonarSource S.A.

Sonar , embrace Quality
http://sonar.codehaus.org
Reply | Threaded
Open this post in threaded view
|

Re: Problem when building sonar 1.5M1

baboune
I've tried the following :
 - adding <mirrorOf>*,!sonar</mirrorOf> to my setting.xml
 - cleaning my local repository (removing all sonar plugin version)
 - Re starting the sonar-web application

And it works!

Thank all for your support.

Baboune