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

java.lang.NoClassDefFoundError: jnr/posix/POSIXHandler

    XMLWordPrintable

Details

    Description

      I made a job that just does

      echo foo >foo.txt
      

      and is set to archive *.txt. Then I bound that job to a slave with a label.

      The build fails with

      + echo foo
      Archiving artifacts
      ERROR: Failed to archive artifacts: *.txt
      java.io.IOException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: jnr/posix/POSIXHandler
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2016)
      	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:57)
      	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:140)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
      	at hudson.model.Run.execute(Run.java:1703)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	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: jnr/posix/POSIXHandler
      	at hudson.remoting.Channel$3.adapt(Channel.java:755)
      	at hudson.remoting.Channel$3.adapt(Channel.java:750)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2014)
      	... 11 more
      Caused by: java.lang.NoClassDefFoundError: jnr/posix/POSIXHandler
      	at hudson.util.IOUtils.mode(IOUtils.java:125)
      	at hudson.util.io.TarArchiver.visit(TarArchiver.java:101)
      	at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
      	at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2540)
      	at hudson.FilePath.writeToTar(FilePath.java:2052)
      	at hudson.FilePath.access$1000(FilePath.java:172)
      	at hudson.FilePath$41.invoke(FilePath.java:1993)
      	at hudson.FilePath$41.invoke(FilePath.java:1989)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	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$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:701)
      Caused by: java.lang.ClassNotFoundException: jnr.posix.POSIXHandler (WebAppClassLoader=Jenkins v1.546@49f4bcf7 did not find class file)
      	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch2(RemoteClassLoader.java:727)
      	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:777)
      	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:784)
      	at sun.reflect.GeneratedMethodAccessor1893.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
      	at hudson.remoting.Request$2.run(Request.java:328)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:679)
      

      If I run the job on the master, it works fine.

      Somehow, the jnr-posix stuff isn't made available on the slave.

      (seems related to JENKINS-18682, which was claused because of inactivity)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              petere Peter Eisentraut
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: