NPE when analyzing Java 8 projects with sonarqube 4.5.2 and sonar-java-plugin-3.2

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

NPE when analyzing Java 8 projects with sonarqube 4.5.2 and sonar-java-plugin-3.2

jean-herve.laveau

Hello,

 

I have the following NPE when I try to analyze Java 8 projects:

 

Configuration :

Sonar 4.5.2

MySql

Plugin

Version

Branding [branding]

1.0

Build Stability [buildstability]

1.3

Checkstyle [checkstyle]

2.3

C / C++ / Objective-C [cpp]

3.5

C# [csharp]

4.0

Findbugs [findbugs]

3.2

Java [java]

3.2

JavaScript [javascript]

2.5

PHP [php]

2.4.1

Pitest [pitest]

0.3

PMD [pmd]

2.2

Python [python]

1.5

Redmine [redmine]

0.2

SCM Activity [scmactivity]

1.8

Scm Stats [scmstats]

0.3.1

StyleCop [stylecop]

1.1

Surefire [surefire]

3.2

Tab Metrics [tabmetrics]

1.4.1

Web [web]

2.3

Widget Lab [widgetlab]

1.6

 

Synopsis :

I have the following NPE when I try to analyze Java 8 projects:

Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project myprojectgw: null: MojoExecutionException: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project myprojectgw: null

See complete log for details

I tried to find on which source file could the NPE occurs I have used exclusions without success. With only one source, NPE occurs :

-Dsonar.exclusions=**/utils/**,**/enums/**,**/exception/**,**/bean/**,**.java,**/Main.java,**/Command.java,**/CommandTestCmd.java,**/AWSClientFactory.java,**/DaoAnalyticsJob.java

Of course no error happens when no source was included :

-Dsonar.exclusions=**/utils/**,**/enums/**,**/exception/**,**/bean/**,**.java,**/Main.java,**/Command.java,**/CommandTestCmd.java,**/AWSClientFactory.java,**/DaoAnalyticsJob.java,**/DaoRplatform.java

But when I analyzed Command.java file again (the first I eliminated) the NPE appears again :

-Dsonar.exclusions=**/utils/**,**/enums/**,**/exception/**,**/bean/**,**.java,**/Main.java,**/CommandTestCmd.java,**/AWSClientFactory.java,**/DaoAnalyticsJob.java,**/DaoRplatform.java

Source file is the following :

package com.appligwcommons.cli;

 

import com.appligwcommons.exception.AppligwCommonsException;

 

public interface Command {

 

                public void execute() throws AppliwCommonsException;

 

                public String getName();

 

}

 

Have you got any idea about that problem.

The same bug occurs in another project having very different pattern, except Java 8.

Thanks in advance for your answer

 

Best regards

Jean-Hervé LAVEAU

Responsable Outils & Méthodes ALM, Outils Transverses

DTI

Ecometering Smart Energy Solutions
GDFSUEZ_ENGIE_FR

Le Jean Monnet

11, place des Vosges - 92400 Courbevoie

Tel. : +33.(0)1.46.67.23.34

GSM : +33.(0)6.70.76.09.92
Mail : [hidden email]

 

 

 




GDF SUEZ Mail Disclaimer: http://www.gdfsuez.com/disclaimer/disclaimer-fr.html




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

    http://xircles.codehaus.org/manage_email

AnalisysError.txt (36K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NPE when analyzing Java 8 projects with sonarqube 4.5.2 and sonar-java-plugin-3.2

Julien HENRY
Hi Jean-Hervé,

This is fixed in 4.5.4:

++

Julien

2015-05-13 16:12 GMT+02:00 <[hidden email]>:

Hello,

 

I have the following NPE when I try to analyze Java 8 projects:

 

Configuration :

Sonar 4.5.2

MySql

Plugin

Version

Branding [branding]

1.0

Build Stability [buildstability]

1.3

Checkstyle [checkstyle]

2.3

C / C++ / Objective-C [cpp]

3.5

C# [csharp]

4.0

Findbugs [findbugs]

3.2

Java [java]

3.2

JavaScript [javascript]

2.5

PHP [php]

2.4.1

Pitest [pitest]

0.3

PMD [pmd]

2.2

Python [python]

1.5

Redmine [redmine]

0.2

SCM Activity [scmactivity]

1.8

Scm Stats [scmstats]

0.3.1

StyleCop [stylecop]

1.1

Surefire [surefire]

3.2

Tab Metrics [tabmetrics]

1.4.1

Web [web]

2.3

Widget Lab [widgetlab]

1.6

 

Synopsis :

I have the following NPE when I try to analyze Java 8 projects:

Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project myprojectgw: null: MojoExecutionException: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project myprojectgw: null

See complete log for details

I tried to find on which source file could the NPE occurs I have used exclusions without success. With only one source, NPE occurs :

-Dsonar.exclusions=**/utils/**,**/enums/**,**/exception/**,**/bean/**,**.java,**/Main.java,**/Command.java,**/CommandTestCmd.java,**/AWSClientFactory.java,**/DaoAnalyticsJob.java

Of course no error happens when no source was included :

-Dsonar.exclusions=**/utils/**,**/enums/**,**/exception/**,**/bean/**,**.java,**/Main.java,**/Command.java,**/CommandTestCmd.java,**/AWSClientFactory.java,**/DaoAnalyticsJob.java,**/DaoRplatform.java

But when I analyzed Command.java file again (the first I eliminated) the NPE appears again :

-Dsonar.exclusions=**/utils/**,**/enums/**,**/exception/**,**/bean/**,**.java,**/Main.java,**/CommandTestCmd.java,**/AWSClientFactory.java,**/DaoAnalyticsJob.java,**/DaoRplatform.java

Source file is the following :

package com.appligwcommons.cli;

 

import com.appligwcommons.exception.AppligwCommonsException;

 

public interface Command {

 

                public void execute() throws AppliwCommonsException;

 

                public String getName();

 

}

 

Have you got any idea about that problem.

The same bug occurs in another project having very different pattern, except Java 8.

Thanks in advance for your answer

 

Best regards

Jean-Hervé LAVEAU

Responsable Outils & Méthodes ALM, Outils Transverses

DTI

Ecometering Smart Energy Solutions
GDFSUEZ_ENGIE_FR

Le Jean Monnet

11, place des Vosges - 92400 Courbevoie

Tel. : +33.(0)1.46.67.23.34

GSM : +33.(0)6.70.76.09.92
Mail : [hidden email]

 

 

 




GDF SUEZ Mail Disclaimer: http://www.gdfsuez.com/disclaimer/disclaimer-fr.html




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

    http://xircles.codehaus.org/manage_email