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

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

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

      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.

          [JENKINS-26257] java.lang.ClassCastException/NPE in Remoting while executing Maven Builder

          Oleg Nenashev added a comment -

          emdepl Thanks! It looks like the same issue though the behavior changed a bit (now it is NPE).
          Will assign to the Remoting queue

          Oleg Nenashev added a comment - emdepl Thanks! It looks like the same issue though the behavior changed a bit (now it is NPE). Will assign to the Remoting queue

          Peter Taucher added a comment - - edited

          Jenkins version: 2.121.1

          Maven Integration Plugin: 3.1.2

           

          After successful maven build issue is present:

          [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
          [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD SUCCESS
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 4.212 s
          [INFO] Finished at: 2018-07-03T08:25:47Z
          [INFO] ------------------------------------------------------------------------
          ERROR: Asynchronous execution failure
          java.util.concurrent.ExecutionException: java.lang.NullPointerException
          	at hudson.remoting.Channel$2.adapt(Channel.java:992)
          	at hudson.remoting.Channel$2.adapt(Channel.java:986)
          	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
          	at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:186)
          	at hudson.maven.Maven3Builder.call(Maven3Builder.java:146)
          	at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
          	at hudson.remoting.Request$2.run(Request.java:369)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748)
          Caused by: java.lang.NullPointerException
          Waiting for Jenkins to finish collecting data
          ERROR: Asynchronous execution failure
          java.util.concurrent.ExecutionException: java.lang.NullPointerException
          	at hudson.remoting.Channel$2.adapt(Channel.java:992)
          	at hudson.remoting.Channel$2.adapt(Channel.java:986)
          	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
          	at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:186)
          	at hudson.maven.Maven3Builder.call(Maven3Builder.java:146)
          	at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
          	at hudson.remoting.Request$2.run(Request.java:369)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748)
          Caused by: java.lang.NullPointerException 

           

          We noticed following 'type' of errors in the system log too:

           Failed to load /home/jenkins/jenkinsdata/fingerprints/8a/81/813a03e2899ccd31f0e92f6cc691.xml
          com.thoughtworks.xstream.mapper.CannotResolveClassException: timestamp
          	at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:376)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43)
          	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
          	at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:48)
          	at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)
          	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
          	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
          	at hudson.util.XStream2.unmarshal(XStream2.java:160)
          	at hudson.util.XStream2.unmarshal(XStream2.java:131)
          	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
          	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1053)
          	at hudson.XmlFile.read(XmlFile.java:147)
          Caused: java.io.IOException: Unable to read /home/jenkins/jenkinsdata/fingerprints/8a/81/813a03e2899ccd31f0e92f6cc691.xml
          	at hudson.XmlFile.read(XmlFile.java:149)
          	at hudson.model.Fingerprint.load(Fingerprint.java:1369)
          	at hudson.model.Fingerprint.load(Fingerprint.java:1357)
          	at hudson.model.FingerprintMap.load(FingerprintMap.java:97)
          	at hudson.model.FingerprintMap.load(FingerprintMap.java:47)
          	at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:161)
          	at hudson.model.FingerprintMap.get(FingerprintMap.java:82)
          	at hudson.model.FingerprintMap.get(FingerprintMap.java:47)
          	at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:111)
          	at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:68)
          	at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:125)
          	at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:112)
          	at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:452)
          	at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:584)
          	at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:498)
          	at hudson.model.Executor$2.call(Executor.java:911)
          	at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
          	at com.sun.proxy.$Proxy75.execute(Unknown Source)
          	at hudson.maven.MavenBuildProxy$Filter$AsyncInvoker.call(MavenBuildProxy.java:294)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
          	at hudson.remoting.Request$2.run(Request.java:369)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          	at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:19)
          	at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
          	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
          	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748)

           

          And discarding old data seems to run into NPE as well:

          Error while serving http://jenkinsserver/administrativeMonitor/OldData/discard
          java.lang.NullPointerException
          	at java.util.TreeMap.putAll(TreeMap.java:313)
          	at java.util.TreeMap.<init>(TreeMap.java:185)
          	at hudson.model.Fingerprint.toString(Fingerprint.java:1412)
          	at java.lang.String.valueOf(String.java:2994)
          	at java.lang.StringBuilder.append(StringBuilder.java:131)
          	at hudson.diagnosis.OldDataMonitor.saveAndRemoveEntries(OldDataMonitor.java:365)
          	at hudson.diagnosis.OldDataMonitor.doDiscard(OldDataMonitor.java:335)
          	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
          	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
          Caused: java.lang.reflect.InvocationTargetException
          	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
          	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
          	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
          	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
          	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
          	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
          	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
          	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
          	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
          	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
          	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
          	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
          	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
          	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
          	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
          	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
          	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
          	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
          	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
          	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
          	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
          	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
          	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
          	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          	at org.eclipse.jetty.server.Server.handle(Server.java:530)
          	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
          	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
          	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
          	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
          	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
          	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
          	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
          	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
          	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
          	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748) 

           

          Seems this can be solved by stopping jenkins, removing all fingerprints and restarting jenkins. NPE does not appear afterwards anymore (for the time being).

          Peter Taucher added a comment - - edited Jenkins version: 2.121.1 Maven Integration Plugin: 3.1.2   After successful maven build issue is present: [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https: //jenkins.io/redirect/serialization-of-anonymous-classes/ [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https: //jenkins.io/redirect/serialization-of-anonymous-classes/ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.212 s [INFO] Finished at: 2018-07-03T08:25:47Z [INFO] ------------------------------------------------------------------------ ERROR: Asynchronous execution failure java.util.concurrent.ExecutionException: java.lang.NullPointerException at hudson.remoting.Channel$2.adapt(Channel.java:992) at hudson.remoting.Channel$2.adapt(Channel.java:986) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:186) at hudson.maven.Maven3Builder.call(Maven3Builder.java:146) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang. Thread .run( Thread .java:748) Caused by: java.lang.NullPointerException Waiting for Jenkins to finish collecting data ERROR: Asynchronous execution failure java.util.concurrent.ExecutionException: java.lang.NullPointerException at hudson.remoting.Channel$2.adapt(Channel.java:992) at hudson.remoting.Channel$2.adapt(Channel.java:986) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:186) at hudson.maven.Maven3Builder.call(Maven3Builder.java:146) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang. Thread .run( Thread .java:748) Caused by: java.lang.NullPointerException   We noticed following 'type' of errors in the system log too: Failed to load /home/jenkins/jenkinsdata/fingerprints/8a/81/813a03e2899ccd31f0e92f6cc691.xml com.thoughtworks.xstream.mapper.CannotResolveClassException: timestamp at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:376) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:48) at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189) at hudson.util.XStream2.unmarshal(XStream2.java:160) at hudson.util.XStream2.unmarshal(XStream2.java:131) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173) at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1053) at hudson.XmlFile.read(XmlFile.java:147) Caused: java.io.IOException: Unable to read /home/jenkins/jenkinsdata/fingerprints/8a/81/813a03e2899ccd31f0e92f6cc691.xml at hudson.XmlFile.read(XmlFile.java:149) at hudson.model.Fingerprint.load(Fingerprint.java:1369) at hudson.model.Fingerprint.load(Fingerprint.java:1357) at hudson.model.FingerprintMap.load(FingerprintMap.java:97) at hudson.model.FingerprintMap.load(FingerprintMap.java:47) at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:161) at hudson.model.FingerprintMap.get(FingerprintMap.java:82) at hudson.model.FingerprintMap.get(FingerprintMap.java:47) at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:111) at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:68) at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:125) at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:112) at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:452) at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:584) at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.model.Executor$2.call(Executor.java:911) at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23) at com.sun.proxy.$Proxy75.execute(Unknown Source) at hudson.maven.MavenBuildProxy$Filter$AsyncInvoker.call(MavenBuildProxy.java:294) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:19) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang. Thread .run( Thread .java:748)   And discarding old data seems to run into NPE as well: Error while serving http: //jenkinsserver/administrativeMonitor/OldData/discard java.lang.NullPointerException at java.util.TreeMap.putAll(TreeMap.java:313) at java.util.TreeMap.<init>(TreeMap.java:185) at hudson.model.Fingerprint.toString(Fingerprint.java:1412) at java.lang. String .valueOf( String .java:2994) at java.lang.StringBuilder.append(StringBuilder.java:131) at hudson.diagnosis.OldDataMonitor.saveAndRemoveEntries(OldDataMonitor.java:365) at hudson.diagnosis.OldDataMonitor.doDiscard(OldDataMonitor.java:335) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:530) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang. Thread .run( Thread .java:748)   Seems this can be solved by stopping jenkins, removing all fingerprints and restarting jenkins. NPE does not appear afterwards anymore (for the time being).

          Jeff Thompson added a comment -

          This issue doesn't seem to occur consistently or repeatedly in all Maven projects. There seem to be some conditions that cause it in some presumably small subset of situations.

          Further, we have at least one report, from Peter Taucher, of the issue being resolved by cleaning up fingerprints. The connection to fingerprints is not obvious. Even with that case, it is hard to know if that is a repeatable resolution.

          If anyone who sees this can provide more information, particularly about how it can be isolated and reproduced, I'll see if I can get a chance to look into it further. Do you see it consistently? For all jobs / builds / agents / configurations? Besides Peter's observations regarding fingerprints, have you observed any candidate causes? Has anyone else tried pursuing that path of removing fingerprints?

          Jeff Thompson added a comment - This issue doesn't seem to occur consistently or repeatedly in all Maven projects. There seem to be some conditions that cause it in some presumably small subset of situations. Further, we have at least one report, from Peter Taucher, of the issue being resolved by cleaning up fingerprints. The connection to fingerprints is not obvious. Even with that case, it is hard to know if that is a repeatable resolution. If anyone who sees this can provide more information, particularly about how it can be isolated and reproduced, I'll see if I can get a chance to look into it further. Do you see it consistently? For all jobs / builds / agents / configurations? Besides Peter's observations regarding fingerprints, have you observed any candidate causes? Has anyone else tried pursuing that path of removing fingerprints?

          I had same issue, it disappeared after removing fingerprints.

          Kostiantyn Shchepanovskyi added a comment - I had same issue, it disappeared after removing fingerprints.

          Jeff Thompson added a comment -

          Thanks for the report, kshchepanovskyi. I have no idea how removing fingerprints would clean up this error. We have two reports of that action eliminating the problem and no further details to diagnose or reproduce the cause. If we don't get more information on how to proceed, I'll plan on closing this issue in a few days.

          Jeff Thompson added a comment - Thanks for the report, kshchepanovskyi . I have no idea how removing fingerprints would clean up this error. We have two reports of that action eliminating the problem and no further details to diagnose or reproduce the cause. If we don't get more information on how to proceed, I'll plan on closing this issue in a few days.

          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.

          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.

          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.

          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.

          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.

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

          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?

           

          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?  

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

              Created:
              Updated:
              Resolved: