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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: core, maven-plugin, remoting
    • Labels:
    • Environment:
      Jenkins Build slave in linux RHEL os, Jenkins 1.518, JDK 7, Maven 3.0.3 etc.
    • Similar Issues:

      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

            Hide
            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.

            Show
            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.
            Hide
            jthompson Jeff Thompson added a comment -

            Warren Morgan, 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.

            Show
            jthompson Jeff Thompson added a comment - Warren Morgan , 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.
            Hide
            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.

            Show
            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.
            Hide
            moshe_zvi Moshe Zvi added a comment -

            Warren Morgan: 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.
            Show
            moshe_zvi Moshe Zvi added a comment - Warren Morgan : 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.
            Hide
            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?

             

            Show
            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

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

                Dates

                Created:
                Updated:
                Resolved: