Menu

#1 NPE at initAuditRules

1.1
closed
nobody
2012-10-03
2012-10-02
No

Hi,

Im trying to test this plugin but not getting anywhere. Using 1.1.21 version:

INFO 13:10:34.530 Execute Scertify Refactoring Assessment postJob...
INFO 13:10:35.068 Audit project com.bla:bla...
DEBUG 13:10:35.164 user authenticated
DEBUG 13:10:35.165 violations loaded
DEBUG 13:10:35.169 Reload the data measure: dsm, id=100425301
ERROR 13:10:35.287 null
java.lang.NullPointerException: null
at com.tocea.sra.server.audit.DTOFactory.initAuditRules(DTOFactory.java:217) ~na:na
at com.tocea.sra.server.audit.DTOFactory.createAudit(DTOFactory.java:315) ~na:na
at com.tocea.sra.server.audit.ToceaPostJob.auditProject(ToceaPostJob.java:166) ~na:na
at com.tocea.sra.server.audit.ToceaPostJob.checkModules(ToceaPostJob.java:261) ~na:na
at com.tocea.sra.server.audit.ToceaPostJob.executeOn(ToceaPostJob.java:111) ~na:na
at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:63) sonar-batch-3.2.jar:na
at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:54) sonar-batch-3.2.jar:na
at org.sonar.batch.phases.Phases.execute(Phases.java:102) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:139) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrap.Module.start(Module.java:83) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:131) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:121) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrap.Module.start(Module.java:83) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrap.Module.start(Module.java:83) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:73) sonar-batch-3.2.jar:na
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60) sonar-batch-3.2.jar:na
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:150) sonar-maven-plugin-3.2.jar:na
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) maven-2.2.1-uber.jar:2.2.1
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98) sonar-maven-plugin-1.0.jar:na
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79) sonar-maven-plugin-1.0.jar:na
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88) sonar-maven-plugin-1.0.jar:na
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) maven-2.2.1-uber.jar:2.2.1
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) maven-2.2.1-uber.jar:2.2.1
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~na:1.6.0_34
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~na:1.6.0_34
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~na:1.6.0_34
at java.lang.reflect.Method.invoke(Method.java:597) ~na:1.6.0_34
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) classworlds-1.1.jar:1.1
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) classworlds-1.1.jar:1.1
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) classworlds-1.1.jar:1.1
at org.codehaus.classworlds.Launcher.main(Launcher.java:375) classworlds-1.1.jar:1.1
INFO 13:10:35.303 Execute Scertify Refactoring Assessment postJob done: 773 ms

Seems this is related with database, since if i use the default derby database than i dont get this problem.

Database: postgresql 9.2
Windows 7 64 bit
Sonar 3.2

Thanks in advance,
Jorge Costa

Please try this version of the plugin, I've added a log to see which rule is involved.

PS : If you want compile the project you can remove XmlUtilsAPI from dependencies and all tests, the other dependencies are in the plugin (META-INF/lib).

1 Attachments

Discussion

  • jorge costa

    jorge costa - 2012-10-02

    So this version it worked, with loads of reported problems. Seems that it fails due to manual rules ! Ive attached the logs, also go an exception starting sonar that should be looked at. But at least this version seems to work.

     
  • jorge costa

    jorge costa - 2012-10-02

    here is the other log

     
  • Sebastien Carreau

    To remove the exception at starting of Sonar, open the jar of the plugin and edit the file static/settings.properties, at line 15 you have to change 'scertify=http\://zeus/scertify/plugins/beta/V1.7.5-A1.6.5-P1.7.11-L1.7.4/' by 'scertify='.

    Concerning the rules with null serverity, any idea where it comes from ?

     
  • jorge costa

    jorge costa - 2012-10-03

    The rules with null severity were created using the Manual Rules feature in sonar (all those toxic stuff). Also some of them have been created by using the sonar manual review. Guess this can be tested on you side by adding comments onto the source code at the drilldown level.

    By the way, im unable to find any META-INF/lib in the source code in souceforge. Can you double check if this available?

     
  • jorge costa

    jorge costa - 2012-10-03

    forget about the last comment, found them in the jar file

     
  • Sebastien Carreau

    Thanks for feedback, it helped me understand the use of manual rules.
    The bugg will be fixed in next release.

    For further information you can contact me by email : sebastien.carreau@tocea.com

    Regards,
    Sébastien Carreau

    • labels: npe, initAuditRules --> npe, initAuditRules, manual rules
    • status: open --> closed
     

Log in to post a comment.