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

Null pointer exception deploying artifact to Artifactory

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Jenkins 2.346.1
      Jdk 1.8.0_345-b01

      Getting an issue while "deploying an Artifact to Artifactory"!!

       

      But once I remove the configuration "Deploying artifact to Artifactory" it got successfully compiled and once I add  ""Deploying artifact to Artifactory", compilation failed with Below error.

       

      Error:

       
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener -
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - EventManagement 1.0-SNAPSHOT ....................... SUCCESS [ 0.471 s]
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - EventManagementSchemas ............................. FAILURE [ 2.150 s]
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - EventManagementUtils ............................... SKIPPED
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - EventManagementEjb ................................. SKIPPED
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - EventManagementEar 1.3 ............................. SKIPPED
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - BUILD FAILURE
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Total time: 3.641 s
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Finished at: 2023-01-09T00:55:13-08:00
      [pool-1-thread-1 for channel id=20676] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
      Waiting for Jenkins to finish collecting data
      [pool-1-thread-1 for channel id=20676] ERROR hudson.maven.Maven3Builder$MavenExecutionListener - Internal error: java.lang.NullPointerException -> [Help 1]
      org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:80)
      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.launchStandard(Launcher.java:329)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
      at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:184)
      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 hudson.maven.Maven3Builder.call(Maven3Builder.java:139)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
      at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at hudson.remoting.Request$2.run(Request.java:376)
      at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
      at org.jfrog.build.extractor.maven.BuildInfoRecorder.addDependenciesToCurrentModule(BuildInfoRecorder.java:621)
      at org.jfrog.build.extractor.maven.BuildInfoRecorder.addModuleToBuild(BuildInfoRecorder.java:468)
      at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeModule(BuildInfoRecorder.java:391)
      at org.jfrog.build.extractor.maven.BuildInfoRecorder.projectSucceeded(BuildInfoRecorder.java:210)
      at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:74)
      at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:91)
      ... 27 more
      [pool-1-thread-1 for channel id=20676] ERROR hudson.maven.Maven3Builder$MavenExecutionListener -
      [pool-1-thread-1 for channel id=20676] ERROR hudson.maven.Maven3Builder$MavenExecutionListener - Re-run Maven using the -X switch to enable full debug logging.
      [pool-1-thread-1 for channel id=20676] ERROR hudson.maven.Maven3Builder$MavenExecutionListener -
      [pool-1-thread-1 for channel id=20676] ERROR hudson.maven.Maven3Builder$MavenExecutionListener - For more information about the errors and possible solutions, please read the following articles:
      [pool-1-thread-1 for channel id=20676] ERROR hudson.maven.Maven3Builder$MavenExecutionListener - [Help 1]

          [JENKINS-70390] Null pointer exception deploying artifact to Artifactory

          Shubham Tomar added a comment -

          Hi Mark, can you please hlep me to resolve this issue?

          Shubham Tomar added a comment - Hi Mark, can you please hlep me to resolve this issue?

          Mark Waite added a comment - - edited

          I'm not sure if the Mark you're referencing is me, but if it is, then the answer is "No, I cannot".

          I'm not a maintainer of the maven integration plugin. I regularly ask users of maven integration plugin to read the warning in the plugin documentation that says:

          The Jenkins project recommends that users transition from the Maven job type to use Pipeline jobs or freestyle jobs.

          If you decide that you cannot transition from the maven job type to Pipeline or freestyle, then you may want to diagnose the issue in the plugin source code and submit a pull request to resolve the issue. That has the benefit that it fixes the problem you're seeing and shares the fix with others.

          Mark Waite added a comment - - edited I'm not sure if the Mark you're referencing is me, but if it is, then the answer is "No, I cannot". I'm not a maintainer of the maven integration plugin. I regularly ask users of maven integration plugin to read the warning in the plugin documentation that says: The Jenkins project recommends that users transition from the Maven job type to use Pipeline jobs or freestyle jobs. If you decide that you cannot transition from the maven job type to Pipeline or freestyle, then you may want to diagnose the issue in the plugin source code and submit a pull request to resolve the issue. That has the benefit that it fixes the problem you're seeing and shares the fix with others.

          Shubham Tomar added a comment -

          Hi Mark, pointing to you!

          In our Jenkins, it does not showing any working related to the one you have mentioned for 'maven integration plugin'.

           

          For that particular error it's throwing, can you please tell possible way I should look for to resolve that issue? 

          Shubham Tomar added a comment - Hi Mark, pointing to you! In our Jenkins, it does not showing any working related to the one you have mentioned for 'maven integration plugin'.   For that particular error it's throwing, can you please tell possible way I should look for to resolve that issue? 

          Mark Waite added a comment -

          The log indicates that the job that is running is a maven job type, not a Pipeline job or a freestyle job.

          The null pointer exception seems to be coming from a JFrog Artifactory api that I assume is called by the maven job. In terms of resolving the issue, I assume you'd need to find the source code for that JFrog Artifactory API and identify what is null that is causing the null pointer exception.

          Mark Waite added a comment - The log indicates that the job that is running is a maven job type, not a Pipeline job or a freestyle job. The null pointer exception seems to be coming from a JFrog Artifactory api that I assume is called by the maven job. In terms of resolving the issue, I assume you'd need to find the source code for that JFrog Artifactory API and identify what is null that is causing the null pointer exception.

            Unassigned Unassigned
            tomashubham Shubham Tomar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: