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

FATAL: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: hudson/remoting/JarCacheSupport$1

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: copy-to-slave-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      I have a scripts directory in my /var/lib/jenkins/userContent folder that I want copied to the slave. I checked the "Copy files into the job's workspace before building" option and then added the value of 'scripts/**' to the "Files to copy" setting. When I run, I get this error. This used to work when I had Ubuntu slaves, but we recently changed over to RHEL. (See Environment details for rhel slave info)

      Here's the error I'm getting:

      [copy-to-slave] Copying 'scripts/**', excluding nothing, from 'file:/var/lib/jenkins/userContent/' on the master to 'file:/var/www/jenkins-slave/workspace/backup_core/' on 'test3.company.com'.
      FATAL: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: hudson/remoting/JarCacheSupport$1
      hudson.util.IOException2: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: hudson/remoting/JarCacheSupport$1
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.copyRecursiveTo(MyFilePath.java:147)
      at com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper.setUp(CopyToSlaveBuildWrapper.java:133)
      at hudson.model.Build$BuildExecution.doRun(Build.java:153)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:518)
      at hudson.model.Run.execute(Run.java:1706)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)
      Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: hudson/remoting/JarCacheSupport$1
      at hudson.remoting.Channel$3.adapt(Channel.java:772)
      at hudson.remoting.Channel$3.adapt(Channel.java:767)
      at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.copyRecursiveTo(MyFilePath.java:145)
      ... 7 more
      Caused by: java.lang.NoClassDefFoundError: hudson/remoting/JarCacheSupport$1
      at hudson.remoting.JarCacheSupport.resolve(JarCacheSupport.java:59)
      at hudson.remoting.ResourceImageBoth.initiateJarRetrieval(ResourceImageBoth.java:40)
      at hudson.remoting.ResourceImageBoth.resolve(ResourceImageBoth.java:22)
      at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:233)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:274)
      at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:113)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
      at hudson.remoting.UserRequest.perform(UserRequest.java:98)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      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.ClassNotFoundException: hudson.remoting.JarCacheSupport$1
      at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 27 more
      Caused by: java.util.zip.ZipException: error reading zip file
      at java.util.zip.ZipFile.read(Native Method)
      at java.util.zip.ZipFile.access$1400(ZipFile.java:56)
      at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:679)
      at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:415)
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
      at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:479)
      at sun.misc.Resource.getBytes(Resource.java:124)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:444)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      ... 33 more

        Attachments

          Activity

          jkeslin Joe Keslin created issue -
          Hide
          jkeslin Joe Keslin added a comment -

          We ran into this same error on one of our Ubuntu slaves today. I guess it's not rhel related like I thought. Disconnecting the slave and relaunching fixed it with this mornings issue.

          Show
          jkeslin Joe Keslin added a comment - We ran into this same error on one of our Ubuntu slaves today. I guess it's not rhel related like I thought. Disconnecting the slave and relaunching fixed it with this mornings issue.
          Hide
          jkeslin Joe Keslin added a comment -

          Still having this issue and restarting the slave doesn't seem to be fixing it for me now. I'm thinking it has to do with a possible file permission issue with the zip file created when transferring the directory.

          My scripts directory (/var/lib/jenkins/userContent/scripts) is checked into svn and I have the "Include ant defaults" option under advanced unchecked.

          The value I have in the "Files to copy" parameter is:

          scripts/

          Paths are relative to is set to "$JENKINS_HOME/userContent"

          I'm running jenkins version 1.563, SSH Slaves 1.10, Copy To Slave Plugin 1.4.4

          Show
          jkeslin Joe Keslin added a comment - Still having this issue and restarting the slave doesn't seem to be fixing it for me now. I'm thinking it has to do with a possible file permission issue with the zip file created when transferring the directory. My scripts directory (/var/lib/jenkins/userContent/scripts) is checked into svn and I have the "Include ant defaults" option under advanced unchecked. The value I have in the "Files to copy" parameter is: scripts/ Paths are relative to is set to "$JENKINS_HOME/userContent" I'm running jenkins version 1.563, SSH Slaves 1.10, Copy To Slave Plugin 1.4.4
          Hide
          jkeslin Joe Keslin added a comment -

          I think this is caused by us using ubuntu master and rhel slaves and they have different versions of Java. I will update when I have confirmed.

          Show
          jkeslin Joe Keslin added a comment - I think this is caused by us using ubuntu master and rhel slaves and they have different versions of Java. I will update when I have confirmed.
          rtyler R. Tyler Croy made changes -
          Field Original Value New Value
          Workflow JNJira [ 164126 ] JNJira + In-Review [ 181518 ]
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Joe Keslin Any updates?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Joe Keslin Any updates?

            People

            • Assignee:
              svvivek Vivekanand SV
              Reporter:
              jkeslin Joe Keslin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: