sonar-maven-plugin 2.4 and sonarqube 4.5.1

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

sonar-maven-plugin 2.4 and sonarqube 4.5.1

dmatag
Hello to everyone.

I've upgraded to sonarqube 4.5.1 this morning and I'm facing this issue
while running mvn sonar:sonar. Is there an issue?

Thank you.


ERROR] Failed to execute goal
org.codehaus.mojo:sonar-maven-plugin:2.4:sonar (default-cli) on project
develtooldto: org/sonar/api/utils/KeyValueFormat$Transformer:
org.sonar.api.utils.KeyValueFormat$Transformer -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.codehaus.mojo:sonar-maven-plugin:2.4:sonar
(default-cli) on project develtooldto:
org/sonar/api/utils/KeyValueFormat$Transformer
     at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
     at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
     at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
     at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
     at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
     at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
     at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
     at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
     at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
     at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException:
org/sonar/api/utils/KeyValueFormat$Transformer
     at
org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:42)
     at
org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
     at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136)
     at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
     at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
     ... 19 more
Caused by: java.lang.NoClassDefFoundError:
org/sonar/api/utils/KeyValueFormat$Transformer
     at java.lang.Class.getDeclaredFields0(Native Method)
     at java.lang.Class.privateGetDeclaredFields(Class.java:2317)
     at java.lang.Class.getDeclaredFields(Class.java:1762)
     at
org.picocontainer.injectors.AdaptingInjection$2.run(AdaptingInjection.java:217)
     at java.security.AccessController.doPrivileged(Native Method)
     at
org.picocontainer.injectors.AdaptingInjection.injectionFieldAnnotated(AdaptingInjection.java:209)
     at
org.picocontainer.injectors.AdaptingInjection.fieldAnnotatedInjectionAdapter(AdaptingInjection.java:188)
     at
org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(AdaptingInjection.java:57)
     at
org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAdapter(AbstractBehaviorFactory.java:44)
     at
org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptInCaching.java:45)
     at
org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:535)
     at
org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:83)
     at
org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1148)
     at
org.sonar.api.platform.ComponentContainer.addExtension(ComponentContainer.java:183)
     at
org.sonar.batch.bootstrap.ExtensionInstaller.doInstall(ExtensionInstaller.java:78)
     at
org.sonar.batch.bootstrap.ExtensionInstaller.install(ExtensionInstaller.java:57)
     at
org.sonar.batch.scan.ModuleScanContainer.addExtensions(ModuleScanContainer.java:175)
     at
org.sonar.batch.scan.ModuleScanContainer.doBeforeStart(ModuleScanContainer.java:76)
     at
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:90)
     at
org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
     at
org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
     at
org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
     at
org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
     at
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
     at
org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
     at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
     at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
     at
org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125)
     at
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
     at
org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
     at
org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173)
     at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
     at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
     at
org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
     at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
     at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
     at
org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
     at org.sonar.runner.api.Runner.execute(Runner.java:100)
     at
org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131)
     ... 22 more
Caused by: java.lang.ClassNotFoundException:
org.sonar.api.utils.KeyValueFormat$Transformer
     at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
     at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
     at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

Kyle Smith
Hello David,

I have a very very similar issue when running 'sonar-runner'. Please check-out the thread I just made on this.

I updated to 4.5.1 this morning and received the same kind of NoClassDefFoundErrors that you received. It was also with the same interface KeyValueFormat. Please see this thread I made here: http://sonarqube.15.x6.nabble.com/Unable-to-Execute-SonarQube-after-Update-to-4-5-1-td5029594.html

Thank-you for reading this. I may rollback my SonarQube application to the previous version if a solution for this is not worked out soon.

Respectfully,

Kyle Smith

Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

marcel_may
In reply to this post by dmatag
I have exactly the same issue after upgrading to Sonar 4.5.1 and using sonar-maven-plugin 2.4.

Is it easy to downgrade to Sonar 4.5 - especially database wise?
Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

piez0rz

I'm not an expert regarding that, but I would say no. Based on my previous experience it's not easy to downgrade, unless you have made a back up of your database (which is a recommended step)

On Oct 30, 2014 4:35 PM, "marcel_may" <[hidden email]> wrote:
I have exactly the same issue after upgrading to Sonar 4.5.1 and using
sonar-maven-plugin 2.4.

Is it easy to downgrade to Sonar 4.5 - especially database wise?



--
View this message in context: http://sonarqube.15.x6.nabble.com/sonar-maven-plugin-2-4-and-sonarqube-4-5-1-tp5029595p5029602.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

Jean-Baptiste Lièvremont
All,

This is the 4th thread on this subject, so please read the related threads, this is most probably due to an outdated plugin, since the offending class was deprecated 2 LTS versions ago and has been removed. So please provide the list of plugins (and associated versions) that you use to help us investigate this issue.

Best regards,

Jean-Baptiste LIEVREMONT | SonarSource
Core Developer

2014-10-30 23:39 GMT+01:00 pi ezor <[hidden email]>:

I'm not an expert regarding that, but I would say no. Based on my previous experience it's not easy to downgrade, unless you have made a back up of your database (which is a recommended step)

On Oct 30, 2014 4:35 PM, "marcel_may" <[hidden email]> wrote:
I have exactly the same issue after upgrading to Sonar 4.5.1 and using
sonar-maven-plugin 2.4.

Is it easy to downgrade to Sonar 4.5 - especially database wise?



--
View this message in context: http://sonarqube.15.x6.nabble.com/sonar-maven-plugin-2-4-and-sonarqube-4-5-1-tp5029595p5029602.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

Julien HENRY
In reply to this post by piez0rz
Hi guys,

Please provide the list of all your installed plugins so that we can spot what is the outdated plugin. FYI KeyValueFormat$Transformer was deprecated in SQ 2.7 and so was removed.

++

Julien

2014-10-30 23:39 GMT+01:00 pi ezor <[hidden email]>:

I'm not an expert regarding that, but I would say no. Based on my previous experience it's not easy to downgrade, unless you have made a back up of your database (which is a recommended step)

On Oct 30, 2014 4:35 PM, "marcel_may" <[hidden email]> wrote:
I have exactly the same issue after upgrading to Sonar 4.5.1 and using
sonar-maven-plugin 2.4.

Is it easy to downgrade to Sonar 4.5 - especially database wise?



--
View this message in context: http://sonarqube.15.x6.nabble.com/sonar-maven-plugin-2-4-and-sonarqube-4-5-1-tp5029595p5029602.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

dgrierso

I suspect that it's the sonar-security-rules-plugin which appears to be referencing the KeyValueFormat class.

 

From the looks of things so do the developers of this.

 

<a href="http://docs.codehaus.org/display/SONAR/Security&#43;Rules&#43;Plugin">http://docs.codehaus.org/display/SONAR/Security+Rules+Plugin

 

Dg.

 


--
David Grierson – SDLC Tools Specialist

Sky Broadcasting - Customer Business Systems - SDLC Tools

Tel: +44 1506 325100 / Email: [hidden email] / Chatter: CBS SDLC Tools

Watermark Building, Alba Campus, Livingston, EH54 7HH

 

From: Julien HENRY [mailto:[hidden email]]
Sent: 31 October 2014 08:34
To: [hidden email]
Subject: Re: [sonar-user] Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

 

Hi guys,

Please provide the list of all your installed plugins so that we can spot what is the outdated plugin. FYI KeyValueFormat$Transformer was deprecated in SQ 2.7 and so was removed.

++

Julien

 

2014-10-30 23:39 GMT+01:00 pi ezor <[hidden email]>:

I'm not an expert regarding that, but I would say no. Based on my previous experience it's not easy to downgrade, unless you have made a back up of your database (which is a recommended step)

On Oct 30, 2014 4:35 PM, "marcel_may" <[hidden email]> wrote:

I have exactly the same issue after upgrading to Sonar 4.5.1 and using
sonar-maven-plugin 2.4.

Is it easy to downgrade to Sonar 4.5 - especially database wise?



--
View this message in context: http://sonarqube.15.x6.nabble.com/sonar-maven-plugin-2-4-and-sonarqube-4-5-1-tp5029595p5029602.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email

 

Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trademarks of British Sky Broadcasting Group plc and Sky International AG and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.
Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

marcel_may
In reply to this post by marcel_may
The cause was outdated plugins, thanks for the tip!

I kicked out the following plugins, and I’m not sure which ones were causing troubles:

-extensions/plugins/sonar-branding-plugin-0.4.jar
-extensions/plugins/sonar-crowd-plugin-1.0.jar
-extensions/plugins/sonar-javascript-plugin-1.6.jar
-extensions/plugins/sonar-jmeter-plugin-0.2.jar
-extensions/plugins/sonar-quality-index-plugin-1.1.3.jar
-extensions/plugins/sonar-scm-activity-plugin-1.6.jar
-extensions/plugins/sonar-scm-stats-plugin-0.3.1.jar
-extensions/plugins/sonar-sigmm-plugin-1.0.1.jar
-extensions/plugins/sonar-taglist-plugin-1.0.jar
-extensions/plugins/sonar-toxicity-chart-plugin-0.1.jar
-extensions/plugins/sonar-useless-code-tracker-plugin-0.6.jar
-extensions/plugins/sonar-web-plugin-2.1.jar
-extensions/plugins/sonar-widget-lab-plugin-1.3.1.jar
-extensions/plugins/sonar-xml-plugin-1.0.1.jar


> On 30 Oct 2014, at 23:33, marcel_may [via SonarQube] <[hidden email]> wrote:
>
> I have exactly the same issue after upgrading to Sonar 4.5.1 and using sonar-maven-plugin 2.4.
>
> Is it easy to downgrade to Sonar 4.5 - especially database wise?

Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

dmatag
These are my plugins:

sonar-taglist-plugin-1.0.jar
sonar-sigmm-plugin-1.0.1.jar
sonar-security-rules-plugin-0.3.2.jar.old
sonar-scm-stats-plugin-0.3.1.jar
sonar-pmd-plugin-2.2.jar
sonar-csv-export-plugin-1.3.jar
hello-world-1.10.jar
sonar-branding-plugin-0.5.jar
sonar-timeline-plugin-1.4.jar
sonar-build-stability-plugin-1.2.1.jar
sonar-findbugs-plugin-3.0.jar
sonar-cobertura-plugin-1.6.3.jar
sonar-checkstyle-plugin-2.1.1.jar
sonar-l10n-es-plugin-1.13.jar
sonar-java-plugin-2.5.jar
Reply | Threaded
Open this post in threaded view
|

Re: sonar-maven-plugin 2.4 and sonarqube 4.5.1

tonyking
This post has NOT been accepted by the mailing list yet.
I face the same problem update from 4.5 to 4.5.1. I have no idea now. my plugin list is:
sonar-abacus-plugin-0.1.jar
sonar-branding-plugin-0.5.jar
sonar-build-stability-plugin-1.2.1.jar
sonar-checkstyle-plugin-2.1.1.jar
sonar-cobertura-plugin-1.6.3.jar
sonar-csharp-plugin-3.3.jar
sonar-cxx-plugin-0.9.jar
sonar-fb-contrib-plugin-1.3.jar
sonar-findbugs-plugin-3.1.jar
sonar-generic-coverage-plugin-1.1.jar
sonar-googleanalytics-plugin-1.1.jar
sonar-groovy-plugin-1.0.1.jar
sonar-issue-assign-plugin-1.4.jar
sonar-issues-density-plugin-1.0.jar
sonar-issues-report-plugin-1.3.jar
sonar-java-plugin-2.5.1.jar
sonar-ldap-plugin-1.4.jar
sonar-pmd-plugin-2.2.jar
sonar-security-rules-plugin-0.3.2.jar
sonar-tab-metrics-plugin-1.4.1.jar
sonar-timeline-plugin-1.4.jar
sonar-useless-code-tracker-plugin-1.0.jar
sonar-visual-studio-plugin-1.2.jar
sonar-widget-lab-plugin-1.6.jar