Quantcast

SonarQube 3.7.3 failing to process java projects

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SonarQube 3.7.3 failing to process java projects

alfville
This post was updated on .
Just updated to SonarQube 3.7.3 from 3.6, when trying to analyze a java project the error below is showing up in the logs.

I am using Hudson (Sonar plugin 2.0.1) to run the analysis.

Not sure if the issue is related but still using Java plugin 1.3, because when I tried to upgrade after some time it shows an error saying that it can't download sonar-squid-java-plugin-1-4.


Your help would be appreciated to fix this.

Regards
-Alfonso


19:43:01  [ERROR] loader constraint violation: when resolving field "VISIBLE" the class loader (instance of org/sonar/runner/impl/IsolatedClassloader) of the referring class, org/apache/commons/io/filefilter/HiddenFileFilter, and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for the field's resolved type, org/apache/commons/io/filefilter/IOFileFilter, have different Class objects for that type
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

David Racodon-2
Hi Alfonso,

Could you please provide the full log as well as a screenshot of the System Info page?

Thank you

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Oct 25, 2013 at 5:43 AM, alfville <[hidden email]> wrote:

Just updated to SonarQube 3.7.3 from 3.6, when trying to analyze a java
project the error below is showing up in the logs.
I am using Hudson (Sonar plugin 2.0.1) to run the analysis.

Your help would be appreciated to fix this.

Regards
-Alfonso


19:43:01  [ERROR] loader constraint violation: when resolving field
"VISIBLE" the class loader (instance of
org/sonar/runner/impl/IsolatedClassloader) of the referring class,
org/apache/commons/io/filefilter/HiddenFileFilter, and the class loader
(instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for the
field's resolved type, org/apache/commons/io/filefilter/IOFileFilter, have
different Class objects for that type



--
View this message in context: http://sonarqube.15.x6.nabble.com/SonarQube-3-7-3-failing-to-process-java-projects-tp5018320.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
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

alfville
Hi David,

Thanks for looking into this, I sent you the information you requested in a private mail.

Regards
-Alfonso
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

David Racodon-2
Hi Alfonso,

To narrow down the issue, could you please remove all the plugins but Java and run another analysis?
Does it succeed? If so, could you please find out which plugin makes the analysis fail?

Thank you

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Oct 25, 2013 at 5:52 PM, alfville <[hidden email]> wrote:
Hi David,

Thanks for looking into this, I sent you the information you requested in a
private mail.

Regards
-Alfonso



--
View this message in context: http://sonarqube.15.x6.nabble.com/SonarQube-3-7-3-failing-to-process-java-projects-tp5018320p5018351.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
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

David Racodon-2
Hi Alfonso,

The root cause of your issue is that you must still be using sonar-maven-plugin 2.0-beta-2. See http://jira.codehaus.org/browse/MSONAR-9.
You should upgrade to version 2.0 or 2.1.

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Mon, Oct 28, 2013 at 10:02 AM, David Racodon <[hidden email]> wrote:
Hi Alfonso,

To narrow down the issue, could you please remove all the plugins but Java and run another analysis?
Does it succeed? If so, could you please find out which plugin makes the analysis fail?

Thank you

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Oct 25, 2013 at 5:52 PM, alfville <[hidden email]> wrote:
Hi David,

Thanks for looking into this, I sent you the information you requested in a
private mail.

Regards
-Alfonso



--
View this message in context: http://sonarqube.15.x6.nabble.com/SonarQube-3-7-3-failing-to-process-java-projects-tp5018320p5018351.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
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

alfville

Hi David,

Thanks for pointing that out, after forcing use of version 2.1 of the plugin everything is working fine now.

One observation

Basically the working environment is set up with Maven 3.0.4, but when the projects were originally setup within Hudson they were setup with Maven 2.2.1.

We are using 2 project types in Hudson, some are built using Maven and the rest are using Ant.

For the Maven ones there was no issue (they were using Maven 3.0.4), but the ones built with Ant were failing (they were using the 2.2.1 version of Maven within Hudson to run SonarQube).

After changing Hudson so it uses Maven 3.0.4, SonarQube analysis was still failing, although at this point with a different issue, basically complaining that a class was missing while using the maven plugin (it was still was picking up the 2.0-beta-2)

Then I changed the configuration on SonarQube installation of Hudson by setting up the version of the maven plugin to 2.1 and at this point everything started working fine.

My concerns are:

First why it did not picked up the latest version automatically

Second, since I am forcing to use 2.1, any new releases in the future will not be picked up and I will need to manually make the change. Would appreciate your suggestions if there is a better way to handle this.

As usual you have been really helpful, thanks a lot.

Regards
-Alfonso
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

alfville
Hi David,

Unfortunately, I am still facing an issue with one project. In this project we use ant for building but is still under Java 1.5. I tried several combinations (see below) but still no luck.

Any suggestions would be appreciated.

Regards
-Alfonso

Using Maven 3.0.4 and either plugin 2.1 or plugin 2.0-beta-2 got error:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project ConfigWorkBenchAdmin: Can not execute SonarQube analysis: Unable to load the mojo 'sonar' in the plugin 'org.codehaus.sonar:sonar-maven-plugin:3.7.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Bad version number in .class file

Using Maven 2.2.1 and either plugin 2.1 or 2.0-beta-2 got error:
Error resolving version for 'org.codehaus.mojo:sonar-maven-plugin': Plugin requires Maven version 3.0

 Using Sonar-Runner 2.0 or 1.4 got error:
 Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

David Racodon-2
In reply to this post by alfville
Hi Alfonso,

To make sure I properly understand: Do you mean that the version of the plugin was not forced before and you forced it to 2.1 to make it work?

Thank you

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Wed, Oct 30, 2013 at 1:57 AM, alfville <[hidden email]> wrote:

Hi David,

Thanks for pointing that out, after forcing use of version 2.1 of the plugin
everything is working fine now.

One observation

Basically the working environment is set up with Maven 3.0.4, but when the
projects were originally setup within Hudson they were setup with Maven
2.2.1.

We are using 2 project types in Hudson, some are built using Maven and the
rest are using Ant.

For the Maven ones there was no issue (they were using Maven 3.0.4), but the
ones built with Ant were failing (they were using the 2.2.1 version of Maven
within Hudson to run SonarQube).

After changing Hudson so it uses Maven 3.0.4, SonarQube analysis was still
failing, although at this point with a different issue, basically
complaining that a class was missing while using the maven plugin (it was
still was picking up the 2.0-beta-2)

Then I changed the configuration on SonarQube installation of Hudson by
setting up the version of the maven plugin to 2.1 and at this point
everything started working fine.

My concerns are:

First why it did not picked up the latest version automatically

Second, since I am forcing to use 2.1, any new releases in the future will
not be picked up and I will need to manually make the change. Would
appreciate your suggestions if there is a better way to handle this.

As usual you have been really helpful, thanks a lot.

Regards
-Alfonso



--
View this message in context: http://sonarqube.15.x6.nabble.com/SonarQube-3-7-3-failing-to-process-java-projects-tp5018320p5018455.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
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

David Racodon-2
In reply to this post by alfville
Hi Alfonso,

Java 6+ is required to run an analysis. See http://docs.codehaus.org/display/SONAR/Requirements.
You can compile your application with Java 1.5 but you have to switch to Java 6+ to run the SonarQube analysis.

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Wed, Oct 30, 2013 at 4:07 AM, alfville <[hidden email]> wrote:
Hi David,

Unfortunately, I am still facing an issue with one project. In this project
we use ant for building but is still under Java 1.5. I tried several
combinations (see below) but still no luck.

Any suggestions would be appreciated.

Regards
-Alfonso

*Using Maven 3.0.4 and either plugin 2.1 or plugin 2.0-beta-2 got error: *
[ERROR] Failed to execute goal
org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project
ConfigWorkBenchAdmin: Can not execute SonarQube analysis: Unable to load the
mojo 'sonar' in the plugin 'org.codehaus.sonar:sonar-maven-plugin:3.7.3' due
to an API incompatibility:
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
Bad version number in .class file

*Using Maven 2.2.1 and either plugin 2.1 or 2.0-beta-2 got error:*
Error resolving version for 'org.codehaus.mojo:sonar-maven-plugin': Plugin
requires Maven version 3.0

* Using Sonar-Runner 2.0 or 1.4 got error: *
 Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
version number in .class file





--
View this message in context: http://sonarqube.15.x6.nabble.com/SonarQube-3-7-3-failing-to-process-java-projects-tp5018320p5018456.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
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

alfville
This post was updated on .
Hi David,

Thanks a lot for your suggestion, after running the SonarQube analysis with Java 6 it is working fine now.

Regards
-Alfonso
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SonarQube 3.7.3 failing to process java projects

David Racodon-2
Good news Alfonso! Thanks for the notification.


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Thu, Oct 31, 2013 at 9:18 PM, alfville <[hidden email]> wrote:

Hi David,

Thanks a lot for your suggestion, after running the SonarQuebe analysis with
Java6 it is working fine now.

Regards
-Alfonso



--
View this message in context: http://sonarqube.15.x6.nabble.com/SonarQube-3-7-3-failing-to-process-java-projects-tp5018320p5018580.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



Loading...