Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1102

Generic upload job running in several threads throwing a NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.16.2
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      When executing Generic upload jobs, occasionally a NullPointerException is thrown:

      13:09:25 [consumer_1] Deploying artifact: XXX/artifactory/generic-local/morning4/92/32/1/test-291-0
      13:09:25 [Thread consumer_2] An exception occurred during execution:
      13:09:25 java.lang.NullPointerException
      13:09:25    at org.apache.http.message.HeaderGroup.getHeaders(HeaderGroup.java:182)
      13:09:25    at org.apache.http.message.AbstractHttpMessage.getHeaders(AbstractHttpMessage.java:73)
      13:09:25    at org.apache.http.impl.client.DefaultClientConnectionReuseStrategy.keepAlive(DefaultClientConnectionReuseStrategy.java:51)
      13:09:25    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:275)
      13:09:25    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
      13:09:25    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
      13:09:25    at org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:85)
      13:09:25    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
      13:09:25    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
      13:09:25    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
      13:09:25    at org.jfrog.build.client.PreemptiveHttpClient.execute(PreemptiveHttpClient.java:102)
      13:09:25    at org.jfrog.build.client.ArtifactoryHttpClient.execute(ArtifactoryHttpClient.java:229)
      13:09:25    at org.jfrog.build.client.ArtifactoryHttpClient.upload(ArtifactoryHttpClient.java:225)
      13:09:25    at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:687)
      13:09:25    at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.doDeployArtifact(ArtifactoryBuildInfoClient.java:374)
      13:09:25    at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:362)
      13:09:25    at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:39)
      13:09:25    at org.jfrog.build.extractor.producerConsumer.ConsumerRunnableBase.run(ConsumerRunnableBase.java:11)
      13:09:25    at java.lang.Thread.run(Thread.java:748)
      13:09:25 
      [Pipeline] }
      [Pipeline] // wrap
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.lang.Exception: Error occurred during operation, please refer to logs for more information.
          at org.jfrog.build.extractor.producerConsumer.ProducerConsumerExecutor.start(ProducerConsumerExecutor.java:84)
          at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:71)
          at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:190)
      Caused: java.lang.RuntimeException: Failed uploading artifacts by spec
          at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:194)
          at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:131)
          at hudson.FilePath.act(FilePath.java:1077)
          at hudson.FilePath.act(FilePath.java:1060)
          at org.jfrog.hudson.pipeline.executors.GenericUploadExecutor.execution(GenericUploadExecutor.java:52)
          at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:65)
          at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:46)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
          at hudson.security.ACL.impersonate(ACL.java:290)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                barb Bar Belity
                Reporter:
                barb Bar Belity
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: