Maven
  1. Maven
  2. MNG-3580

FATAL ERROR and NPE on start

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
    • Complexity:
      Intermediate
    • Number of attachments :
      5

      Description

      Any mvn command does give me the following error message
      [INFO] Scanning for projects...
      [INFO] Reactor build order:
      [INFO] Business Rules Extractor
      [INFO] Business Rules Extractor core functions
      [INFO] COBOL Parser and ANTLR Tools
      [INFO] Business Rules Extractor data model
      [INFO] Documentation Extractor module
      [INFO] Extractor module
      [INFO] Business Rules Navigator
      WAGON_VERSION: 1.0-beta-2
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Business Rules Extractor
      [INFO] task-segment: [install]
      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NullPointerException
      at org.apache.maven.project.ModelUtils.mergePluginLists(ModelUtils.java:164)
      at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleBuildInheritance(DefaultModelInheritanceAssembler.java:366)
      at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:168)
      at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:61)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:852)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:253)
      at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:265)
      at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:197)
      at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:176)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1274)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1542)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1033)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:997)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:477)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:59)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:39)
      at java.lang.reflect.Method.invoke(Method.java:612)
      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)
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1 second
      [INFO] Finished at: Fri May 16 13:10:16 EDT 2008
      [INFO] Final Memory: 6M/19M
      [INFO] ------------------------------------------------------------------------

        Issue Links

          Activity

          Hide
          Joakim Erdfelt added a comment -

          Attaching MNG-3580-maven-core.patch

          This patch adds a JUnit test to the maven-core project that demonstrates one of the NPEs encountered while operating within the IBM JDK.

          NOTE: This patch does not fix the issue, just adds a Unit test to tickle one of the bugs.

          Show
          Joakim Erdfelt added a comment - Attaching MNG-3580 -maven-core.patch This patch adds a JUnit test to the maven-core project that demonstrates one of the NPEs encountered while operating within the IBM JDK. NOTE: This patch does not fix the issue, just adds a Unit test to tickle one of the bugs.
          Hide
          Benjamin Bentmann added a comment -

          Thanks Joakim for the test, so we have tracked down the NPE from ArtifactResolverDiagnoser to an actual Maven bug: MNG-3753

          The remaining question: Is the originally reported NPE from ModelUtils still reproducible with latest IBM JDK 1.6 SR2?

          Show
          Benjamin Bentmann added a comment - Thanks Joakim for the test, so we have tracked down the NPE from ArtifactResolverDiagnoser to an actual Maven bug: MNG-3753 The remaining question: Is the originally reported NPE from ModelUtils still reproducible with latest IBM JDK 1.6 SR2?
          Hide
          Joakim Erdfelt added a comment -

          Once I roll in the patch from MNG-3573, I can now see the error messages for bad parent pom information.

          The original ModelUtils NPE goes away if I fix the bad parent pom information on the corporate repository.

          So, the result of all of this is ...

          1) ModelUtils iterates thru a parentPlugins List that has a null entry.
          2) The null entry occurs due to a pom parsing error on bad UTF8 encoding.
          2.a) The IBM JDK allows this null entry to be created in the List.
          3) The root cause of the null entry (the bad parsing) is incorrectly reported to the system as a Unable to Find Artifact.
          4) The crucial information, "There is a bad pom" is not communicated, to the user, or the system.

          I think we can close this Jira, apply MNG-3753, and create a new Jira for clearer error messages on bad poms.
          Funny enough, better error messages on bad poms has (kinda) been started as MNG-3392

          Show
          Joakim Erdfelt added a comment - Once I roll in the patch from MNG-3573 , I can now see the error messages for bad parent pom information. The original ModelUtils NPE goes away if I fix the bad parent pom information on the corporate repository. So, the result of all of this is ... 1) ModelUtils iterates thru a parentPlugins List that has a null entry. 2) The null entry occurs due to a pom parsing error on bad UTF8 encoding. 2.a) The IBM JDK allows this null entry to be created in the List. 3) The root cause of the null entry (the bad parsing) is incorrectly reported to the system as a Unable to Find Artifact. 4) The crucial information, "There is a bad pom" is not communicated, to the user, or the system. I think we can close this Jira, apply MNG-3753 , and create a new Jira for clearer error messages on bad poms. Funny enough, better error messages on bad poms has (kinda) been started as MNG-3392
          Hide
          Jon Sharp added a comment -

          I can confirm that upgrading to IBM JDK 1.6 SR2 (on ppc) fixed this issue for me.

          Show
          Jon Sharp added a comment - I can confirm that upgrading to IBM JDK 1.6 SR2 (on ppc) fixed this issue for me.
          Hide
          Brett Porter added a comment -

          re-closing per last 2 comments

          Show
          Brett Porter added a comment - re-closing per last 2 comments

            People

            • Assignee:
              Brett Porter
              Reporter:
              Erik Putrycz
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: