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

Shell task ClassNotFoundException: javax.servlet.ServletException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core, remoting
    • 1.642.4 master jvm: osx 10.12; oracle 1.8u112

      slave: 4.8.15-moby; CentOS Linux release 7.2.1511; openjdk version "1.8.0_71"

      Periodically see the next stacktrace:

      Jan 06, 2017 12:17:30 AM org.jenkinsci.plugins.cloudstats.CloudStatistics getIdFor
      INFO: No support for cloud-stats-plugin by class com.github.kostyasha.yad.DockerComputer
      Jan 06, 2017 12:17:32 AM hudson.tasks.Shell$DescriptorImpl getShellOrDefault
      WARNING: null
      java.io.IOException: Remote call on dockers-111f8342303b failed
      	at hudson.remoting.Channel.call(Channel.java:789)
      	at hudson.tasks.Shell$DescriptorImpl.getShellOrDefault(Shell.java:141)
      	at hudson.tasks.Shell.buildCommandLine(Shell.java:85)
      	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95)
      	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      	at hudson.model.Build$BuildExecution.build(Build.java:205)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletException
      	at hudson.tasks.Shell$DescriptorImpl$Shellinterpreter.call(Shell.java:182)
      	at hudson.tasks.Shell$DescriptorImpl$Shellinterpreter.call(Shell.java:177)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at hudson.remoting.Engine$1$1.run(Engine.java:62)
      	at java.lang.Thread.run(Thread.java:745)
      	at ......remote call to dockers-111f8342303b(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
      	at hudson.remoting.Channel.call(Channel.java:781)
      	... 13 more
      Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletException
      	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch(RemoteClassLoader.java:724)
      	at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
      	at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
      	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      	at ......remote call to channel(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      	at hudson.remoting.Request.call(Request.java:172)
      	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:253)
      	at com.sun.proxy.$Proxy6.fetch(Unknown Source)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:259)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at hudson.tasks.Shell$DescriptorImpl$Shellinterpreter.call(Shell.java:182)
      	at hudson.tasks.Shell$DescriptorImpl$Shellinterpreter.call(Shell.java:177)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at hudson.remoting.Engine$1$1.run(Engine.java:62)
      	at java.lang.Thread.run(Thread.java:745)
      
      Jan 06, 2017 12:19:15 AM hudson.model.Run execute
      INFO: test #68 main build action completed: SUCCESS
      Jan 06, 2017 12:19:15 AM com.github.kostyasha.yad.DockerSlave _terminate
      INFO: Requesting disconnect for computer: 'dockers-111f8342303b'
      Jan 06, 2017 12:19:15 AM hudson.remoting.AbstractByteArrayCommandTransport$1 handle
      WARNING: Failed to construct Command
      java.io.EOFException
      	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2335)
      	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2804)
      	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:802)
      	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
      	at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
      	at hudson.remoting.AbstractByteArrayCommandTransport$1.handle(AbstractByteArrayCommandTransport.java:61)
      	at org.jenkinsci.remoting.nio.NioChannelHub$2.run(NioChannelHub.java:594)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	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:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      
      Jan 06, 2017 12:19:16 AM com.github.kostyasha.yad.DockerSlave _terminate
      

      Happens because https://github.com/jenkinsci/jenkins/blob/bbafe6e982ebc1d3e36ec2d95a1610ff934dc990/core/src/main/java/hudson/tasks/Shell.java#L232
      calls Functions that has javax import.

            integer Kanstantsin Shautsou
            integer Kanstantsin Shautsou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: