Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72525

Random NPE in Maven builds using Jenkins Artifactory Plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • artifactory-plugin
    • Jenkins Version: 2.361.4
      Jenkins Artifactory Plugin version: 3.18.8
      Oracle JDK: 1.8.0_152
      Apache Maven: 3.5.0

      Jenkins Version: 2.361.4

      Jenkins Artifactory Plugin version: 3.18.8

      Oracle JDK: 1.8.0_152

      Apache Maven: 3.5.0

      We are using static Jenkins slaves which has Windows OS. When using the Artifactory Jenkins plugin to build a module using Maven, time to time we get the following error. This has not been the case for years but has been observed with the mentioned Jenkins and Jenkins Artifactory Plugin versions.

      Please note that we are using a common local repository (but with Takari wrapper extension in maven installation for safe concurrent builds) for builds but with dynamic unique module versions for non-release builds.

      The error stack trace is as below

       Jenkins Artifactory Plugin version: 3.18.8
      
       Artifactory integration is enabled
      
       Executing command: cmd /c git log --pretty=format:%s -1
      
       [integration] $ ..\jdk1.8.0_152\bin/java.exe -classpath ..\apache-maven-3.5.0\boot\* -Dmaven.home=..\apache-maven-3.5.0 -Dmaven.conf=..\apache-maven-3.5.0\conf -DbuildInfoConfig.propertiesFile=..\workspace\mastera7770cf6\integration@tmp\artifactory\buildInfo2411121456771251022.properties -DbuildInfoConfig.artifactoryResolutionEnabled=true -Dm3plugin.lib=..\workspace\mastera7770cf6\integration@tmp\artifactory\cache\artifactory-plugin\3.18.8 -Dclassworlds.conf=..\workspace\mastera7770cf6\integration@tmp\artifactory\classworlds4836976646043867953conf -Dmaven.multiModuleProjectDirectory=..\workspace\mastera7770cf6\integration org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml -B clean install -U -DskipValidation=true -e -Ditf.skip.tests=true 
      
       SLF4J: Class path contains multiple SLF4J bindings.
      
       SLF4J: Found binding in [jar:file:/../apache-maven-3.5.0/lib/maven-slf4j-provider-3.5.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      
       SLF4J: Found binding in [jar:file:/../workspace/mastera7770cf6/integration@tmp/artifactory/cache/artifactory-plugin/3.18.8/slf4j-simple-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      
       SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      
       SLF4J: Actual binding is of type [org.slf4j.impl.MavenSimpleLoggerFactory]
      
       SLF4J: Class path contains multiple SLF4J bindings.
      
       SLF4J: Found binding in [jar:file:/../apache-maven-3.5.0/lib/maven-slf4j-provider-3.5.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      
       SLF4J: Found binding in [jar:file:/../workspace/mastera7770cf6/integration@tmp/artifactory/cache/artifactory-plugin/3.18.8/slf4j-simple-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      
       SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      
       SLF4J: Actual binding is of type [org.slf4j.impl.MavenSimpleLoggerFactory]
      
       [main] INFO org.apache.maven.cli.MavenCli - Error stacktraces are turned on.
      
       [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
      
       INFO org.apache.maven.cli.transfer.Slf4jMavenTransferListener - Downloading: ../maven-metadata.xml
      
       [DefaultMetadataResolver-0-1] INFO org.apache.maven.cli.transfer.Slf4jMavenTransferListener - Downloading: ../maven-metadata.xml
      
       [DefaultMetadataResolver-0-1] INFO org.apache.maven.cli.transfer.Slf4jMavenTransferListener - Downloaded: ../maven-metadata.xml (619 B at 827 B/s)
      
       [DefaultMetadataResolver-0-0] INFO org.apache.maven.cli.transfer.Slf4jMavenTransferListener - Downloaded: ../maven-metadata.xml (619 B at 827 B/s)
      
       [main] ERROR org.apache.maven.cli.MavenCli - Internal error: java.lang.NullPointerException -> [Help 1]
      
       org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      
       	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:122)
      
       	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      
       	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      
       	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      
       	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      
       	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      
       	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
       	at java.lang.reflect.Method.invoke(Method.java:498)
      
       	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      
       	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      
       	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      
       	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      
       Caused by: java.lang.NullPointerException
      
       	at org.apache.maven.repository.internal.DefaultVersionResolver$Key.<init>(DefaultVersionResolver.java:534)
      
       	at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:173)
      
       	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:311)
      
       	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255)
      
       	at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseArtifactResolver.resolveArtifacts(ArtifactoryEclipseArtifactResolver.java:56)
      
       	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232)
      
       	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:268)
      
       	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:199)
      
       	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:211)
      
       	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:325)
      
       	at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:202)
      
       	at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)
      
       	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.resolveExtensionArtifacts(DefaultMavenPluginManager.java:910)
      
       	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupExtensionsRealm(DefaultMavenPluginManager.java:841)
      
       	at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipsePluginManager.setupExtensionsRealm(ArtifactoryEclipsePluginManager.java:29)
      
       	at org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildingHelper.java:196)
      
       	at org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBuildingListener.java:99)
      
       	at org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.java:44)
      
       	at org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1348)
      
       	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:443)
      
       	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:423)
      
       	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:580)
      
       	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:371)
      
       	at org.jfrog.build.extractor.maven.ArtifactoryProjectBuilder.build(ArtifactoryProjectBuilder.java:47)
      
       	at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:400)
      
       	at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:391)
      
       	at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:78)
      
       	at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:511)
      
       	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:221)
      
       	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      
       	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      
       	... 11 more
      
       [main] ERROR org.apache.maven.cli.MavenCli - 
      
       [main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
      
       [main] ERROR org.apache.maven.cli.MavenCli - 
      
       [main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
      
       [main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException
      
       ERROR: Couldn't execute Maven task. RuntimeException: Maven build failed with exit code 1
      
      Maven build failed. Couldn't execute Maven task. RuntimeException: Maven build failed with exit code 1
      

            eyalbe Eyal Ben Moshe
            kavindu_rana Kavindu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: