Java Plugin 4.0 and Sonar 5.6

636 views
Skip to first unread message

qjafc...@gmail.com

unread,
Jul 6, 2016, 8:56:08 AM7/6/16
to SonarQube
Hi,

i've just update my Sonar 5.6 with the latest Java plugin 4.0
My maven command (mvn sonar:sonar) uses version 3.0.2 of org.sonarsource.scanner.maven:sonar-maven-plugin.

With the new Java plugin 4.0, my mvn command fails :
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project : Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar: java.lang.NoSuchMethodError: org.sonar.plugins.java.api.JavaResourceLocator.findResourceByClassName(Ljava/lang/String;)Lorg/sonar/api/resources/Resource;

With the previous version of Java plugin, my maven command success.

Best Regards,
qj

Michael Gumowski

unread,
Jul 6, 2016, 9:09:07 AM7/6/16
to qjafc...@gmail.com, SonarQube
Hello qj,

Do you have version 3.3 of the Findbugs plugin installed on your SonarQube (SQ)?
If you don't have the findbugs plugin, I would be interested by the list of plugin you currently have installed in your SQ instance.

The Java Analyzer 4.0 introduced slight changes in API in order to stay aligned with API from SQ 5.6. Unfortunately, it also had as side effect to introduce potentially breaking changes for plugins relying on the Java Analyzer. 
However, as far as we know, only the findbugs plugin is affected. Note that version 3.4 of the Findbugs plugin, currently under request for feedback period (see this thread), should get back compatibility.

Regards,

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/d7dc2a64-d5de-4716-a584-9d295e29deca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

qjafc...@gmail.com

unread,
Jul 6, 2016, 9:14:31 AM7/6/16
to SonarQube, qjafc...@gmail.com
Hi Michael,

my current plugins are :

C#    5.3 installed
CSS    2.0 installed
Checkstyle    2.4 installed
Findbugs    3.3 installed
Git    1.2 installed
Java Languages    4.0 installed
Java Properties    2.0 installed
JavaScript    2.14 installed
Motion Chart    1.7 installed
PMD    2.6 installed
SVN    1.3 installed
Sonargraph    3.5 installed
Timeline    1.5 installed
Web    2.4 installed
Widget Lab    1.8.1 installed
XML    1.4.1 installed

tia

Michael Gumowski

unread,
Jul 6, 2016, 9:22:57 AM7/6/16
to qjafc...@gmail.com, SonarQube
Okay, so you have 3 options:
  • Delay the update to version 4.0 of the Java Analyzer, waiting for Findbugs next release fixing compatibility
  • Remove the findbugs plugin from your plugins
  • Try the release candidate of version Findbugs 3.4 (and provide feedback if compatibility is restored in the related topic, which would be really appreciated).
Regards,

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

qjafc...@gmail.com

unread,
Jul 6, 2016, 9:41:13 AM7/6/16
to SonarQube, qjafc...@gmail.com
I've installed the 3.4.2 version of Findbugs, and all it's ok now.

tx Michael for your help.

Best Regards,
qj

dave...@gmail.com

unread,
Jul 6, 2016, 12:05:47 PM7/6/16
to SonarQube, qjafc...@gmail.com
Michael,

I was having the same problem, tried updating findbugs to 3.4.2 and was still getting the same error. Ultimately, I also had to remove the Cobertura plugin and then life got good again.

Michael Gumowski

unread,
Jul 7, 2016, 2:51:58 AM7/7/16
to dave...@gmail.com, SonarQube, Bruno Lamouret
Thanks a lot for the notification David!

I created the a Github issue on the Cobertura project to notify its maintainer of the compatibility issue: Github Issue #5

Regards,

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com

Reply all
Reply to author
Forward
0 new messages