Maven Project Info Reports Plugin
  1. Maven Project Info Reports Plugin
  2. MPIR-70

NullPointerException when generating Dependencies report

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows, JDK 1.5
    • Number of attachments :
      4

      Description

      The stack trace is attached below. Please note that this is NOT a duplicate of MPIR-2 (I was told to create a separate issue). Let me know if there's any other information I can provide. Thanks!

      [INFO] Generating "Dependencies" report.
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NullPointerException
      at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:991)
      at java.lang.Double.parseDouble(Double.java:482)
      at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderSectionDependencyFileDetails(DependenciesRenderer.java:375)
      at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderBody(DependenciesRenderer.java:165)
      at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:65)
      at org.apache.maven.report.projectinfo.DependenciesReport.executeReport(DependenciesReport.java:140)
      at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101)
      at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:266)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:99)
      at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:130)
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:97)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
      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:585)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      1. MPIR70-20070716-exec-206.txt
        88 kB
        Denis Cabasson
      2. MPIR70-20070716-exec-207.txt
        65 kB
        Denis Cabasson
      3. MPIR-70-minimal.patch
        1.0 kB
        Denis Cabasson

        Activity

        Hide
        Denis Cabasson added a comment -

        Problems appears with version 2.1-20070702.114546-7 of the plugin.

        Seems to have something to do with dependencies declared in the parent.

        The line 375 of DependenciesRenderer.java reads :
        highestjdk = Math.max( highestjdk, Double.parseDouble( jarDetails.getJdkRevision() ) );

        and jarDetails.getJdkRevision() is null (thus the NPE).

        Show
        Denis Cabasson added a comment - Problems appears with version 2.1-20070702.114546-7 of the plugin. Seems to have something to do with dependencies declared in the parent. The line 375 of DependenciesRenderer.java reads : highestjdk = Math.max( highestjdk, Double.parseDouble( jarDetails.getJdkRevision() ) ); and jarDetails.getJdkRevision() is null (thus the NPE).
        Hide
        Denis Cabasson added a comment -

        Simple test case raising the NPE.

        Show
        Denis Cabasson added a comment - Simple test case raising the NPE.
        Hide
        Denis Cabasson added a comment -

        Minimal patch (just checking for null before offending line)

        Show
        Denis Cabasson added a comment - Minimal patch (just checking for null before offending line)
        Hide
        Dennis Lundberg added a comment -

        This seems to have been solved by the upgrade to the released version of shared-jar. I am unable to reproduce it.

        I have just deployed a new SNAPSHOT: maven-project-info-reports-plugin 2.1-20070714.172404-8. Can you confirm that this has been solved?

        Show
        Dennis Lundberg added a comment - This seems to have been solved by the upgrade to the released version of shared-jar. I am unable to reproduce it. I have just deployed a new SNAPSHOT: maven-project-info-reports-plugin 2.1-20070714.172404-8. Can you confirm that this has been solved?
        Hide
        Denis Cabasson added a comment -

        Thx for you help Dennis.

        AFAIK, this issue is not solved. I'm still getting the NPE when running a 'mvn site' from the parent project of my test case. Is it what you tried to do? Did it work for you?
        The MPIR plugin resolved to your version, but it's not working here...

        Anyway, I'm attaching the 2 executions, using either maven 2.0.6 or 2.0.7 (I've not yet upgraded to 2.0.7, but the NPE occurs in both versions).

        Show
        Denis Cabasson added a comment - Thx for you help Dennis. AFAIK, this issue is not solved. I'm still getting the NPE when running a 'mvn site' from the parent project of my test case. Is it what you tried to do? Did it work for you? The MPIR plugin resolved to your version, but it's not working here... Anyway, I'm attaching the 2 executions, using either maven 2.0.6 or 2.0.7 (I've not yet upgraded to 2.0.7, but the NPE occurs in both versions).
        Hide
        Joel Wiegman added a comment -

        I'm using Maven 2.0.7 and the newest maven-project-info-reports-plugin 2.1-20070714.172404-8.

        I am still seeing the problem. Let me know if there is any more information I can provide.

        Show
        Joel Wiegman added a comment - I'm using Maven 2.0.7 and the newest maven-project-info-reports-plugin 2.1-20070714.172404-8. I am still seeing the problem. Let me know if there is any more information I can provide.
        Hide
        Dennis Lundberg added a comment -

        Patch has been applied. Thanks!

        New SNAPSHOT has been deployed: maven-project-info-reports-plugin 2.1-20070730.180544-9

        Please confirm that it solves this issue.

        Show
        Dennis Lundberg added a comment - Patch has been applied. Thanks! New SNAPSHOT has been deployed: maven-project-info-reports-plugin 2.1-20070730.180544-9 Please confirm that it solves this issue.
        Hide
        Denis Cabasson added a comment -

        Everything working fine here with the latest snapshot version.

        Was the highestJdk parameter really interesting? Why wasn't it resolved?

        Anyway, thanks for the fix Dennis, at least the build is back on the tracks.

        (I guess status and fix version can be updated)

        Show
        Denis Cabasson added a comment - Everything working fine here with the latest snapshot version. Was the highestJdk parameter really interesting? Why wasn't it resolved? Anyway, thanks for the fix Dennis, at least the build is back on the tracks. (I guess status and fix version can be updated)

          People

          • Assignee:
            Dennis Lundberg
            Reporter:
            Joel Wiegman
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: