Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5307

NPE during resolution of dependencies - parallel mode

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.8.2, 4.0.0, 4.0.0-alpha-1
    • Component/s: Dependencies
    • Labels:
      None
    • Environment:
      Linux, IBM JVM 1.6, Builder is Atlassian Bamboo 2.7.6

      Description

      When building a project for the first time, maven fails with an internal NPE (see stacktrace below). This happens in case the first build is a parallel build (-T 5C), regardless for the actual goal (install, deploy,..). When the build is first run without -T, subsequent builds run without any issues.

      Given the code in http://svn.apache.org/viewvc/maven/maven-3/tags/maven-3.0.4/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java?revision=1232336&view=markup projectToResolve seems to be null, which seems to be a MavenSession problem (just guessing here).

      Stacktrace:

      5-Jul-2012 01:03:50	[INFO] BUILD FAILURE
      05-Jul-2012 01:03:50	[INFO] ------------------------------------------------------------------------
      05-Jul-2012 01:03:50	[INFO] Total time: 13.424s (Wall Clock)
      05-Jul-2012 01:03:50	[INFO] Finished at: Thu Jul 05 01:03:50 CEST 2012
      05-Jul-2012 01:03:50	[INFO] Final Memory: 107M/361M
      05-Jul-2012 01:03:50	[INFO] ------------------------------------------------------------------------
      05-Jul-2012 01:03:50	[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
      05-Jul-2012 01:03:50	org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask.run(FutureTask.java:150)
      05-Jul-2012 01:03:50	        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask.run(FutureTask.java:150)
      05-Jul-2012 01:03:50	        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:898)
      05-Jul-2012 01:03:50	        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:920)
      05-Jul-2012 01:03:50	        at java.lang.Thread.run(Thread.java:736)
      05-Jul-2012 01:03:50	Caused by: java.lang.NullPointerException
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:289)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      05-Jul-2012 01:03:50	        ... 10 more
      05-Jul-2012 01:03:50	[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
      05-Jul-2012 01:03:50	org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask.run(FutureTask.java:150)
      05-Jul-2012 01:03:50	        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask.run(FutureTask.java:150)
      05-Jul-2012 01:03:50	        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:898)
      05-Jul-2012 01:03:50	        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:920)
      05-Jul-2012 01:03:50	        at java.lang.Thread.run(Thread.java:736)
      05-Jul-2012 01:03:50	Caused by: java.lang.NullPointerException
      05-Jul-2012 01:03:50	        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.calcImports(DefaultMavenPluginManager.java:406)
      05-Jul-2012 01:03:50	        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:302)
      05-Jul-2012 01:03:50	        at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:175)
      05-Jul-2012 01:03:50	        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:78)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      05-Jul-2012 01:03:50	        ... 10 more
      05-Jul-2012 01:03:50	[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-install) on project domainservices: Failed to install metadata nl.apg.gps:domainservices:2012.2.1.0-SNAPSHOT/maven-metadata.xml: Could not read metadata /var/maven/repo3/nl/apg/gps/domainservices/2012.2.1.0-SNAPSHOT/maven-metadata-local.xml: input contained no data -> [Help 2]
      05-Jul-2012 01:03:50	org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-install) on project domainservices: Failed to install metadata nl.apg.gps:domainservices:2012.2.1.0-SNAPSHOT/maven-metadata.xml: Could not read metadata /var/maven/repo3/nl/apg/gps/domainservices/2012.2.1.0-SNAPSHOT/maven-metadata-local.xml: input contained no data
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask.run(FutureTask.java:150)
      05-Jul-2012 01:03:50	        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
      05-Jul-2012 01:03:50	        at java.util.concurrent.FutureTask.run(FutureTask.java:150)
      05-Jul-2012 01:03:50	        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:898)
      05-Jul-2012 01:03:50	        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:920)
      05-Jul-2012 01:03:50	        at java.lang.Thread.run(Thread.java:736)
      05-Jul-2012 01:03:50	Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to install metadata nl.apg.gps:domainservices:2012.2.1.0-SNAPSHOT/maven-metadata.xml: Could not read metadata /var/maven/repo3/nl/apg/gps/domainservices/2012.2.1.0-SNAPSHOT/maven-metadata-local.xml: input contained no data
      05-Jul-2012 01:03:50	        at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:139)
      05-Jul-2012 01:03:50	        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      05-Jul-2012 01:03:50	        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      05-Jul-2012 01:03:50	        ... 13 more
      05-Jul-2012 01:03:50	Caused by: org.apache.maven.artifact.installer.ArtifactInstallationException: Failed to install metadata nl.apg.gps:domainservices:2012.2.1.0-SNAPSHOT/maven-metadata.xml: Could not read metadata /var/maven/repo3/nl/apg/gps/domainservices/2012.2.1.0-SNAPSHOT/maven-metadata-local.xml: input contained no data
      05-Jul-2012 01:03:50	        at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:111)
      05-Jul-2012 01:03:50	        at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:89)
      05-Jul-2012 01:03:50	        ... 15 more
      05-Jul-2012 01:03:50	Caused by: org.sonatype.aether.installation.InstallationException: Failed to install metadata nl.apg.gps:domainservices:2012.2.1.0-SNAPSHOT/maven-metadata.xml: Could not read metadata /var/maven/repo3/nl/apg/gps/domainservices/2012.2.1.0-SNAPSHOT/maven-metadata-local.xml: input contained no data
      05-Jul-2012 01:03:50	        at org.sonatype.aether.impl.internal.DefaultInstaller.install(DefaultInstaller.java:313)
      05-Jul-2012 01:03:50	        at org.sonatype.aether.impl.internal.DefaultInstaller.install(DefaultInstaller.java:211)
      05-Jul-2012 01:03:50	        at org.sonatype.aether.impl.internal.DefaultInstaller.install(DefaultInstaller.java:158)
      05-Jul-2012 01:03:50	        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.install(DefaultRepositorySystem.java:436)
      05-Jul-2012 01:03:50	        at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:107)
      05-Jul-2012 01:03:50	        ... 16 more
      05-Jul-2012 01:03:50	Caused by: org.sonatype.aether.RepositoryException: Could not read metadata /var/maven/repo3/nl/apg/gps/domainservices/2012.2.1.0-SNAPSHOT/maven-metadata-local.xml: input contained no data
      05-Jul-2012 01:03:50	        at org.apache.maven.repository.internal.MavenMetadata.read(MavenMetadata.java:101)
      05-Jul-2012 01:03:50	        at org.apache.maven.repository.internal.MavenMetadata.merge(MavenMetadata.java:69)
      05-Jul-2012 01:03:50	        at org.sonatype.aether.impl.internal.DefaultInstaller.install(DefaultInstaller.java:301)
      05-Jul-2012 01:03:50	        ... 20 more
      05-Jul-2012 01:03:50	Caused by: java.io.EOFException: input contained no data
      05-Jul-2012 01:03:50	        at org.codehaus.plexus.util.xml.pull.MXParser.fillBuf(MXParser.java:3005)
      05-Jul-2012 01:03:50	        at org.codehaus.plexus.util.xml.pull.MXParser.more(MXParser.java:3048)
      05-Jul-2012 01:03:50	        at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1422)
      05-Jul-2012 01:03:50	        at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1407)
      05-Jul-2012 01:03:50	        at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1105)
      05-Jul-2012 01:03:50	        at org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:1193)
      05-Jul-2012 01:03:50	        at org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:1122)
      05-Jul-2012 01:03:50	        at org.apache.maven.repository.internal.MavenMetadata.read(MavenMetadata.java:97)
      05-Jul-2012 01:03:50	        ... 22 more
      05-Jul-2012 01:03:50	[ERROR] 
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                jeroen.benckhuijsen Jeroen Benckhuijsen
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: