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

java.lang.ClassCastException/NPE in Remoting while executing Maven Builder

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not A Defect
    • core, maven-plugin, remoting
    • Jenkins Build slave in linux RHEL os, Jenkins 1.518, JDK 7, Maven 3.0.3 etc.

    Description

      We are getting below exception in case of all the builds on JDK 7, Maven 3.0.3 even in case of successful build scenarion.

      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 45:36.641s
      [INFO] Finished at: Wed Dec 31 15:26:27 IST 2014
      [INFO] Final Memory: 226M/605M
      [INFO] ------------------------------------------------------------------------
      ERROR: Asynchronous execution failure
      java.util.concurrent.ExecutionException: java.lang.ClassCastException
      at hudson.remoting.Channel$3.adapt(Channel.java:784)
      at hudson.remoting.Channel$3.adapt(Channel.java:779)
      at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:186)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:143)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:324)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassCastException
      ERROR: Asynchronous execution failure
      java.util.concurrent.ExecutionException: java.lang.ClassCastException
      at hudson.remoting.Channel$3.adapt(Channel.java:784)
      at hudson.remoting.Channel$3.adapt(Channel.java:779)
      at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:186)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:143)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:324)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassCastException
      ERROR: Asynchronous execution failure

      Need help to know the fix of the same problem.

      Attachments

        Issue Links

          Activity

            wamorgan Warren Morgan added a comment -

            I had the same issue. I believe that it comes from having the "Disable automatic archiving" box checked in the Advanced tab of the Build menu in a Maven Project but not checking the "Disable automatic fingerprinting of consumed and produced artifacts" box. I assume that
            leads to an attempt to fingerprint archives that were not created and results in a null pointer.

            wamorgan Warren Morgan added a comment - I had the same issue. I believe that it comes from having the "Disable automatic archiving" box checked in the Advanced tab of the Build menu in a Maven Project but not checking the "Disable automatic fingerprinting of consumed and produced artifacts" box. I assume that leads to an attempt to fingerprint archives that were not created and results in a null pointer.
            jthompson Jeff Thompson added a comment -

            wamorgan, thanks for providing that additional information. That makes a lot of sense. The more recent comments on this issue seem to all revolve around fingerprinting so at least at this time, it seems like this is a workaround that resolves the issue.

            This doesn't seem to be a Remoting issue anymore. There might be some other component that could be improved to better handle this situation.

            jthompson Jeff Thompson added a comment - wamorgan , thanks for providing that additional information. That makes a lot of sense. The more recent comments on this issue seem to all revolve around fingerprinting so at least at this time, it seems like this is a workaround that resolves the issue. This doesn't seem to be a Remoting issue anymore. There might be some other component that could be improved to better handle this situation.
            jthompson Jeff Thompson added a comment -

            It looks like this has been identified according to several people as a configuration issue regarding fingerprinting. No one else has provided different situations. If someone would like to submit an enhancement request with clear information on how the configuration could be improved to avoid this that would be useful.

            jthompson Jeff Thompson added a comment - It looks like this has been identified according to several people as a configuration issue regarding fingerprinting. No one else has provided different situations. If someone would like to submit an enhancement request with clear information on how the configuration could be improved to avoid this that would be useful.
            moshe_zvi Moshe Zvi added a comment -

            wamorgan: Thanks for the tip. In my case the Disable automatic artifact archiving  was not set, and I still got the error.

            However, selecting Disable automatic fingerprinting ... seems to have done the trick. So it's definitely a fingerprint issue, and I agree that it's unrelated to remote execution.

            For anyone looking this up:

            • In the maven section (Build), expand the Advanced section, and look for these properties.
            moshe_zvi Moshe Zvi added a comment - wamorgan : Thanks for the tip. In my case the  Disable automatic artifact archiving   was not set, and I still got the error. However, selecting Disable automatic fingerprinting ...  seems to have done the trick. So it's definitely a fingerprint issue, and I agree that it's unrelated to remote execution. For anyone looking this up: In the maven section (Build), expand the Advanced section, and look for these properties.
            tiendungitd Dennis Tran added a comment -

            I got the same issue in Jenkins 2.150.1.

            Disabling the automatic fingerprinting removes the exception in the log. But what is the side effect of disabling fingerprinting? (and why did it work previsously). Will disabling fingerprinting not break dependency management between projects?

             

            tiendungitd Dennis Tran added a comment - I got the same issue in Jenkins 2.150.1. Disabling the automatic fingerprinting removes the exception in the log. But what is the side effect of disabling fingerprinting? (and why did it work previsously). Will disabling fingerprinting not break dependency management between projects?  

            People

              jthompson Jeff Thompson
              jenkinsswapnil swapnil soor
              Votes:
              9 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: