[PLUGIN] NullPointer with SCM Activity 1.4

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[PLUGIN] NullPointer with SCM Activity 1.4

Mickael BOURDEL-2

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 

Reply | Threaded
Open this post in threaded view
|

Re: [PLUGIN] NullPointer with SCM Activity 1.4

David Gageot
Hi,

Can you check in your database that there is a row with 'name' set to 'scm.hash'
in the table 'metrics'?

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 




--
-- David
Reply | Threaded
Open this post in threaded view
|

RE: [PLUGIN] NullPointer with SCM Activity 1.4

Mickael BOURDEL-2

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David

Reply | Threaded
Open this post in threaded view
|

Re: [PLUGIN] NullPointer with SCM Activity 1.4

David Gageot
Hi Mickael,

A couple of questions:
 + Do you have the problem each time you run sonar?
 + Which database are you using?
 + You had to restart sonar after you upgraded, haven't you?

David.


On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David




--
-- David
Reply | Threaded
Open this post in threaded view
|

Re: [PLUGIN] NullPointer with SCM Activity 1.4

David Gageot
I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:
Hi Mickael,

A couple of questions:
 + Do you have the problem each time you run sonar?
 + Which database are you using?
 + You had to restart sonar after you upgraded, haven't you?

David.


On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David




--
-- David



--
-- David
Reply | Threaded
Open this post in threaded view
|

RE: [PLUGIN] NullPointer with SCM Activity 1.4

Mickael BOURDEL-2

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David

Reply | Threaded
Open this post in threaded view
|

Re: [PLUGIN] NullPointer with SCM Activity 1.4

Freddy Mallet
Hi Mickael,

I tried to reproduce this error locally by using Oracle DB but without any success.

Here are few additional questions :
  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 
In fact, there is one use case which can lead to such error :
  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error
Kind regards,
Fredy
-----
Sonar for Continuous Inspection



On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David


Reply | Threaded
Open this post in threaded view
|

RE: [PLUGIN] NullPointer with SCM Activity 1.4

Mickael BOURDEL-2

Hi Freddy,

 

I confirm in my directory is extensions/plugins and I have only SCM Activity 1.4 . For upgrading, I used Update Center et restart Sonar.

I confirm I have only on Sonar oracle schema.

 

I have downgraded the plugin (remove version 1.4, put version 1.3, restart Sonar). I have no problem on this version.

I have upgraded the plugin by myself (remove version 1.3, put version 1.4, restart Sonar). I have the NullPointer…

 

I don’t what is the trouble.

 

Regards,

Mickael Bourdel

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : vendredi 8 juin 2012 12:37
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Mickael,

 

I tried to reproduce this error locally by using Oracle DB but without any success.

 

Here are few additional questions :

  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 

In fact, there is one use case which can lead to such error :

  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error

Kind regards,

Fredy

-----

Sonar for Continuous Inspection



On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David

 

Reply | Threaded
Open this post in threaded view
|

Re: [PLUGIN] NullPointer with SCM Activity 1.4

Freddy Mallet
Argh Michael ... could you do the following test :
  • Stop the Sonar server
  • Set the METRICS.ENABLE column value to 1 for the 'sonar.hash' metric
  • Restart the Sonar server
  • What is the value of METRICS.ENABLE column for the 'sonar.hash' metric ?
Thanks for your help
Freddy
-----
Sonar for Continuous Inspection



On Mon, Jun 11, 2012 at 5:59 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi Freddy,

 

I confirm in my directory is extensions/plugins and I have only SCM Activity 1.4 . For upgrading, I used Update Center et restart Sonar.

I confirm I have only on Sonar oracle schema.

 

I have downgraded the plugin (remove version 1.4, put version 1.3, restart Sonar). I have no problem on this version.

I have upgraded the plugin by myself (remove version 1.3, put version 1.4, restart Sonar). I have the NullPointer…

 

I don’t what is the trouble.

 

Regards,

Mickael Bourdel

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : vendredi 8 juin 2012 12:37


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Mickael,

 

I tried to reproduce this error locally by using Oracle DB but without any success.

 

Here are few additional questions :

  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 

In fact, there is one use case which can lead to such error :

  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error

Kind regards,

Fredy

-----

Sonar for Continuous Inspection



On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David

 


Reply | Threaded
Open this post in threaded view
|

RE: [PLUGIN] NullPointer with SCM Activity 1.4

Mickael BOURDEL-2

Hi Freddy,

 

I suppose you mean “scm.hash” instead “sonar.hash” ?

 

After all your description, i always have the value 1 !

 

Regards

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : mardi 12 juin 2012 11:08
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Argh Michael ... could you do the following test :

  • Stop the Sonar server
  • Set the METRICS.ENABLE column value to 1 for the 'sonar.hash' metric
  • Restart the Sonar server
  • What is the value of METRICS.ENABLE column for the 'sonar.hash' metric ?

Thanks for your help

Freddy

-----

Sonar for Continuous Inspection



On Mon, Jun 11, 2012 at 5:59 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi Freddy,

 

I confirm in my directory is extensions/plugins and I have only SCM Activity 1.4 . For upgrading, I used Update Center et restart Sonar.

I confirm I have only on Sonar oracle schema.

 

I have downgraded the plugin (remove version 1.4, put version 1.3, restart Sonar). I have no problem on this version.

I have upgraded the plugin by myself (remove version 1.3, put version 1.4, restart Sonar). I have the NullPointer…

 

I don’t what is the trouble.

 

Regards,

Mickael Bourdel

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : vendredi 8 juin 2012 12:37


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Mickael,

 

I tried to reproduce this error locally by using Oracle DB but without any success.

 

Here are few additional questions :

  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 

In fact, there is one use case which can lead to such error :

  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error

Kind regards,

Fredy

-----

Sonar for Continuous Inspection

 

On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David

 

 

Reply | Threaded
Open this post in threaded view
|

Re: [PLUGIN] NullPointer with SCM Activity 1.4

Freddy Mallet
Hi Michael,

I suppose you mean “scm.hash” instead “sonar.hash” ?


Indeed :)
 

After all your description, i always have the value 1 !


And which means that you should not get anymore the NullPointerException when using version 1.4 of the SCM Activity. Is it the case ?

Thanks
Freddy
 

 

Regards

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : mardi 12 juin 2012 11:08


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Argh Michael ... could you do the following test :

  • Stop the Sonar server
  • Set the METRICS.ENABLE column value to 1 for the 'sonar.hash' metric
  • Restart the Sonar server
  • What is the value of METRICS.ENABLE column for the 'sonar.hash' metric ?

Thanks for your help

Freddy

-----

Sonar for Continuous Inspection



On Mon, Jun 11, 2012 at 5:59 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi Freddy,

 

I confirm in my directory is extensions/plugins and I have only SCM Activity 1.4 . For upgrading, I used Update Center et restart Sonar.

I confirm I have only on Sonar oracle schema.

 

I have downgraded the plugin (remove version 1.4, put version 1.3, restart Sonar). I have no problem on this version.

I have upgraded the plugin by myself (remove version 1.3, put version 1.4, restart Sonar). I have the NullPointer…

 

I don’t what is the trouble.

 

Regards,

Mickael Bourdel

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : vendredi 8 juin 2012 12:37


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Mickael,

 

I tried to reproduce this error locally by using Oracle DB but without any success.

 

Here are few additional questions :

  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 

In fact, there is one use case which can lead to such error :

  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error

Kind regards,

Fredy

-----

Sonar for Continuous Inspection

 

On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David

 

 


Reply | Threaded
Open this post in threaded view
|

RE: [PLUGIN] NullPointer with SCM Activity 1.4

Mickael BOURDEL-2

Hi Freddy,

 

Indeed, I forgot the information. Unfortunatelly, I have always the same NullPointer.

 

Regards,

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : mardi 12 juin 2012 18:01
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Michael,

 

I suppose you mean “scm.hash” instead “sonar.hash” ?

 

Indeed :)

 

After all your description, i always have the value 1 !

 

And which means that you should not get anymore the NullPointerException when using version 1.4 of the SCM Activity. Is it the case ?

 

Thanks

Freddy

 

 

Regards

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : mardi 12 juin 2012 11:08


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Argh Michael ... could you do the following test :

  • Stop the Sonar server
  • Set the METRICS.ENABLE column value to 1 for the 'sonar.hash' metric
  • Restart the Sonar server
  • What is the value of METRICS.ENABLE column for the 'sonar.hash' metric ?

Thanks for your help

Freddy

-----

Sonar for Continuous Inspection

 

On Mon, Jun 11, 2012 at 5:59 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi Freddy,

 

I confirm in my directory is extensions/plugins and I have only SCM Activity 1.4 . For upgrading, I used Update Center et restart Sonar.

I confirm I have only on Sonar oracle schema.

 

I have downgraded the plugin (remove version 1.4, put version 1.3, restart Sonar). I have no problem on this version.

I have upgraded the plugin by myself (remove version 1.3, put version 1.4, restart Sonar). I have the NullPointer…

 

I don’t what is the trouble.

 

Regards,

Mickael Bourdel

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : vendredi 8 juin 2012 12:37


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Mickael,

 

I tried to reproduce this error locally by using Oracle DB but without any success.

 

Here are few additional questions :

  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 

In fact, there is one use case which can lead to such error :

  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error

Kind regards,

Fredy

-----

Sonar for Continuous Inspection

 

On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David

 

 

 

Reply | Threaded
Open this post in threaded view
|

RE: [PLUGIN] NullPointer with SCM Activity 1.4

Mickael BOURDEL-2

Hello Freddy,

 

I have a good news. You always have right J. Our maven did not use the right schema sonar while Sonar server.

 

I see a little evolution for debug log will to log the database used during an analysis

 

Again, sorry for the inconvenience,

 

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Mickael BOURDEL [mailto:[hidden email]]
Envoyé : mercredi 13 juin 2012 09:38
À : [hidden email]
Objet : RE: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Freddy,

 

Indeed, I forgot the information. Unfortunatelly, I have always the same NullPointer.

 

Regards,

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [[hidden email]]
Envoyé : mardi 12 juin 2012 18:01
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Michael,

 

I suppose you mean “scm.hash” instead “sonar.hash” ?

 

Indeed :)

 

After all your description, i always have the value 1 !

 

And which means that you should not get anymore the NullPointerException when using version 1.4 of the SCM Activity. Is it the case ?

 

Thanks

Freddy

 

 

Regards

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : mardi 12 juin 2012 11:08


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Argh Michael ... could you do the following test :

  • Stop the Sonar server
  • Set the METRICS.ENABLE column value to 1 for the 'sonar.hash' metric
  • Restart the Sonar server
  • What is the value of METRICS.ENABLE column for the 'sonar.hash' metric ?

Thanks for your help

Freddy

-----

Sonar for Continuous Inspection

 

On Mon, Jun 11, 2012 at 5:59 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi Freddy,

 

I confirm in my directory is extensions/plugins and I have only SCM Activity 1.4 . For upgrading, I used Update Center et restart Sonar.

I confirm I have only on Sonar oracle schema.

 

I have downgraded the plugin (remove version 1.4, put version 1.3, restart Sonar). I have no problem on this version.

I have upgraded the plugin by myself (remove version 1.3, put version 1.4, restart Sonar). I have the NullPointer…

 

I don’t what is the trouble.

 

Regards,

Mickael Bourdel

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : vendredi 8 juin 2012 12:37


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Mickael,

 

I tried to reproduce this error locally by using Oracle DB but without any success.

 

Here are few additional questions :

  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 

In fact, there is one use case which can lead to such error :

  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error

Kind regards,

Fredy

-----

Sonar for Continuous Inspection

 

On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: [PLUGIN] NullPointer with SCM Activity 1.4

Freddy Mallet
Good news Mickael and thanks for the notification !

FYI, with Sonar 3.1 this is no more possible to face such configuration issue : http://jira.codehaus.org/browse/SONAR-3126 :)
-----
Sonar for Continuous Inspection



On Thu, Jun 14, 2012 at 9:58 AM, Mickael BOURDEL <[hidden email]> wrote:

Hello Freddy,

 

I have a good news. You always have right J. Our maven did not use the right schema sonar while Sonar server.

 

I see a little evolution for debug log will to log the database used during an analysis

 

Again, sorry for the inconvenience,

 

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Mickael BOURDEL [mailto:[hidden email]]
Envoyé : mercredi 13 juin 2012 09:38
À : [hidden email]
Objet : RE: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Freddy,

 

Indeed, I forgot the information. Unfortunatelly, I have always the same NullPointer.

 

Regards,

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [[hidden email]]
Envoyé : mardi 12 juin 2012 18:01
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Michael,

 

I suppose you mean “scm.hash” instead “sonar.hash” ?

 

Indeed :)

 

After all your description, i always have the value 1 !

 

And which means that you should not get anymore the NullPointerException when using version 1.4 of the SCM Activity. Is it the case ?

 

Thanks

Freddy

 

 

Regards

Mickael Bourdel
Développements Front Office
Tél: 04.50.43.29.86
[hidden email]

ca1_c

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : mardi 12 juin 2012 11:08


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Argh Michael ... could you do the following test :

  • Stop the Sonar server
  • Set the METRICS.ENABLE column value to 1 for the 'sonar.hash' metric
  • Restart the Sonar server
  • What is the value of METRICS.ENABLE column for the 'sonar.hash' metric ?

Thanks for your help

Freddy

-----

Sonar for Continuous Inspection

 

On Mon, Jun 11, 2012 at 5:59 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi Freddy,

 

I confirm in my directory is extensions/plugins and I have only SCM Activity 1.4 . For upgrading, I used Update Center et restart Sonar.

I confirm I have only on Sonar oracle schema.

 

I have downgraded the plugin (remove version 1.4, put version 1.3, restart Sonar). I have no problem on this version.

I have upgraded the plugin by myself (remove version 1.3, put version 1.4, restart Sonar). I have the NullPointer…

 

I don’t what is the trouble.

 

Regards,

Mickael Bourdel

 

De : Freddy Mallet [mailto:[hidden email]]
Envoyé : vendredi 8 juin 2012 12:37


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi Mickael,

 

I tried to reproduce this error locally by using Oracle DB but without any success.

 

Here are few additional questions :

  • Could you confirm the directory extensions/plugins/ doesn't contain the old and the new version of the SCM Activity plugin ?
  • Could you confirm that you've only one Sonar oracle schema ? 

In fact, there is one use case which can lead to such error :

  1. You've only one Sonar oracle schema
  2. You've one Sonar server on which the SCM Activity plugin version 1.4 has been installed
  3. You've another Sonar server which doesn't embed the SCM Activity plugin and which has been restarted by using the same Sonar oracle schema. 
  4. In that case the scm.hash property is deactivated by the second Sonar server and you get the reported error

Kind regards,

Fredy

-----

Sonar for Continuous Inspection

 

On Thu, Jun 7, 2012 at 2:21 PM, Mickael BOURDEL <[hidden email]> wrote:

Hi David

 

 + Do you have the problem each time you run sonar? => Yes at each analysis

 + Which database are you using? => Oracle11g

 + You had to restart sonar after you upgraded, haven't you? => Yes, I did it

 + In the database, is the metric "scm.hash" enabled or disabled? => You mean in the column ENABLED of table METRICS ? If it is that, I have 0.

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 13:36


À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

I forgot one question: In the database, is the metric "scm.hash" enabled or disabled?

On 7 June 2012 13:33, David Gageot <[hidden email]> wrote:

Hi Mickael,

 

A couple of questions:

 + Do you have the problem each time you run sonar?

 + Which database are you using?

 + You had to restart sonar after you upgraded, haven't you?

 

David.

 

On 7 June 2012 10:44, Mickael BOURDEL <[hidden email]> wrote:

Hi David,

 

Yes, I have this row. What I have to do ?

 

Regards

Mickael Bourdel

 

De : David Gageot [mailto:[hidden email]]
Envoyé : jeudi 7 juin 2012 10:17
À : [hidden email]
Objet : Re: [sonar-user] [PLUGIN] NullPointer with SCM Activity 1.4

 

Hi,

 

Can you check in your database that there is a row with 'name' set to 'scm.hash'

in the table 'metrics'?

 

David

On 7 June 2012 10:00, Mickael BOURDEL <[hidden email]> wrote:

Hi,

 

I have upgraded the plugin SCM Activity 1.3 to 1.4 on my Sonar 3.0.1 using Subversion.

Unfortunately, I got a NullPointer during the first analysis :

 

 

[INFO] [07:47:59.470] Retrieve SCM blame information...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 14.593s

[INFO] Finished at: Thu Jun 07 07:47:59 GMT 2012

[INFO] Final Memory: 12M/490M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project bundle: Can not execute Sonar

        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:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        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: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)

        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)

        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.NullPointerException

        at org.sonar.api.measures.Measure.<init>(Measure.java:70)

        at org.sonar.batch.DefaultTimeMachine.toMeasure(DefaultTimeMachine.java:150)

        at org.sonar.batch.DefaultTimeMachine.getMeasures(DefaultTimeMachine.java:60)

        at org.sonar.plugins.scmactivity.PreviousSha1Finder.find(PreviousSha1Finder.java:40)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.collect(ScmActivitySensor.java:106)

        at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:91)

        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)

        at org.sonar.batch.phases.Phases.execute(Phases.java:93)

        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)

        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)

        at org.sonar.batch.bootstrap.Module.start(Module.java:83)

        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)

        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)

        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Any ideas ?

 

Regards,

Mickael Bourdel

 



 

--
-- David



 

--
-- David



 

--
-- David