org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED

Jenkins JIRA | Stephan Pauxberger | 2 years ago
  1. 0

    This one seems to be rather tricky. After upgrade to 1.587, I saw this exception during the the run of the sonar plugin in a post step: {code} 20:19:33 Warte bis Jenkins die Datensammlung abgeschlossen hat 20:19:33 [ERROR] Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED -> [Help 1] 20:19:33 org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED 20:19:33 at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 20:19:33 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 20:19:33 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 20:19:33 at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:597) 20:19:33 at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) 20:19:33 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) 20:19:33 at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:597) 20:19:33 at hudson.maven.Maven3Builder.call(Maven3Builder.java:136) 20:19:33 at hudson.maven.Maven3Builder.call(Maven3Builder.java:71) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:121) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:49) 20:19:33 at hudson.remoting.Request$2.run(Request.java:324) 20:19:33 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 20:19:33 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 20:19:33 at java.util.concurrent.FutureTask.run(FutureTask.java:138) 20:19:33 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 20:19:33 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 20:19:33 at java.lang.Thread.run(Thread.java:662) 20:19:33 Caused by: java.lang.IllegalStateException: cannot change build result while in COMPLETED 20:19:33 at hudson.model.Run.setResult(Run.java:458) 20:19:33 at hudson.maven.MavenBuild$ProxyImpl.setResult(MavenBuild.java:494) 20:19:33 at hudson.maven.MavenBuild$ProxyImpl2.setResult(MavenBuild.java:547) 20:19:33 at sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:483) 20:19:33 at hudson.model.Executor$1.call(Executor.java:579) 20:19:33 at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23) 20:19:33 at com.sun.proxy.$Proxy91.setResult(Unknown Source) 20:19:33 at sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:483) 20:19:33 at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:320) 20:19:33 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:295) 20:19:33 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:254) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:121) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:49) 20:19:33 at hudson.remoting.Request$2.run(Request.java:324) 20:19:33 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 20:19:33 at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18) 20:19:33 at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) 20:19:33 at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) 20:19:33 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 20:19:33 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 20:19:33 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 20:19:33 at java.lang.Thread.run(Thread.java:745) 20:19:33 at ......remote call to channel(Native Method) 20:19:33 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) 20:19:33 at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) 20:19:33 at hudson.remoting.Channel.call(Channel.java:752) 20:19:33 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:173) 20:19:33 at com.sun.proxy.$Proxy7.setResult(Unknown Source) 20:19:33 at hudson.maven.MavenBuildProxy$Filter.setResult(MavenBuildProxy.java:235) 20:19:33 at hudson.maven.Maven3Builder$MavenExecutionListener.recordProjectEnded(Maven3Builder.java:554) 20:19:33 at hudson.maven.Maven3Builder$MavenExecutionListener.projectSucceeded(Maven3Builder.java:538) 20:19:33 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:74) 20:19:33 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:91) 20:19:33 ... 28 more {code} A also found mentions of similar behaviour here: https://groups.google.com/forum/#!topic/jenkinsci-users/jrkAQyq6jLs Downgrading to 1.583 did work for me. Somehow, the State of the run seems to be changed to COMPLETED before the actual build is finished. I think the reason for this to show up only now lies here: https://github.com/jenkinsci/jenkins/commit/28dfd90d2d6ae99c57eb174871c46f4e07e303ba#diff-c4f9931d88bca347279b881007d71f0eL445 Earlier, since asserts are disabled by default, it never presented a problem until this change.

    Jenkins JIRA | 2 years ago | Stephan Pauxberger
    org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED
  2. 0

    This one seems to be rather tricky. After upgrade to 1.587, I saw this exception during the the run of the sonar plugin in a post step: {code} 20:19:33 Warte bis Jenkins die Datensammlung abgeschlossen hat 20:19:33 [ERROR] Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED -> [Help 1] 20:19:33 org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED 20:19:33 at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 20:19:33 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 20:19:33 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 20:19:33 at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:597) 20:19:33 at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) 20:19:33 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) 20:19:33 at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:19:33 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:597) 20:19:33 at hudson.maven.Maven3Builder.call(Maven3Builder.java:136) 20:19:33 at hudson.maven.Maven3Builder.call(Maven3Builder.java:71) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:121) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:49) 20:19:33 at hudson.remoting.Request$2.run(Request.java:324) 20:19:33 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 20:19:33 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 20:19:33 at java.util.concurrent.FutureTask.run(FutureTask.java:138) 20:19:33 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 20:19:33 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 20:19:33 at java.lang.Thread.run(Thread.java:662) 20:19:33 Caused by: java.lang.IllegalStateException: cannot change build result while in COMPLETED 20:19:33 at hudson.model.Run.setResult(Run.java:458) 20:19:33 at hudson.maven.MavenBuild$ProxyImpl.setResult(MavenBuild.java:494) 20:19:33 at hudson.maven.MavenBuild$ProxyImpl2.setResult(MavenBuild.java:547) 20:19:33 at sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:483) 20:19:33 at hudson.model.Executor$1.call(Executor.java:579) 20:19:33 at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23) 20:19:33 at com.sun.proxy.$Proxy91.setResult(Unknown Source) 20:19:33 at sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source) 20:19:33 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 20:19:33 at java.lang.reflect.Method.invoke(Method.java:483) 20:19:33 at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:320) 20:19:33 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:295) 20:19:33 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:254) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:121) 20:19:33 at hudson.remoting.UserRequest.perform(UserRequest.java:49) 20:19:33 at hudson.remoting.Request$2.run(Request.java:324) 20:19:33 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 20:19:33 at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18) 20:19:33 at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) 20:19:33 at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) 20:19:33 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 20:19:33 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 20:19:33 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 20:19:33 at java.lang.Thread.run(Thread.java:745) 20:19:33 at ......remote call to channel(Native Method) 20:19:33 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) 20:19:33 at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) 20:19:33 at hudson.remoting.Channel.call(Channel.java:752) 20:19:33 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:173) 20:19:33 at com.sun.proxy.$Proxy7.setResult(Unknown Source) 20:19:33 at hudson.maven.MavenBuildProxy$Filter.setResult(MavenBuildProxy.java:235) 20:19:33 at hudson.maven.Maven3Builder$MavenExecutionListener.recordProjectEnded(Maven3Builder.java:554) 20:19:33 at hudson.maven.Maven3Builder$MavenExecutionListener.projectSucceeded(Maven3Builder.java:538) 20:19:33 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:74) 20:19:33 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) 20:19:33 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:91) 20:19:33 ... 28 more {code} A also found mentions of similar behaviour here: https://groups.google.com/forum/#!topic/jenkinsci-users/jrkAQyq6jLs Downgrading to 1.583 did work for me. Somehow, the State of the run seems to be changed to COMPLETED before the actual build is finished. I think the reason for this to show up only now lies here: https://github.com/jenkinsci/jenkins/commit/28dfd90d2d6ae99c57eb174871c46f4e07e303ba#diff-c4f9931d88bca347279b881007d71f0eL445 Earlier, since asserts are disabled by default, it never presented a problem until this change.

    Jenkins JIRA | 2 years ago | Stephan Pauxberger
    org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED
  3. 0

    Jenkins users - Violations cause a java.lang.IllegalStateException: cannot change build result while in COMPLETED

    nabble.com | 7 months ago
    org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalStateException: cannot change build result while in COMPLETED
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Violations cause a java.lang.IllegalStateException: cannot change build result while in COMPLETED

    Google Groups | 2 years ago | llaumgui
    java.lang.IllegalStateException: cannot change build result while in COMPLETED

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      cannot change build result while in COMPLETED

      at hudson.model.Run.setResult()
    2. Hudson
      Run.setResult
      1. hudson.model.Run.setResult(Run.java:458)
      1 frame
    3. Hudson Maven Embedder
      MavenBuild$ProxyImpl2.setResult
      1. hudson.maven.MavenBuild$ProxyImpl.setResult(MavenBuild.java:494)
      2. hudson.maven.MavenBuild$ProxyImpl2.setResult(MavenBuild.java:547)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:483)
      3 frames
    5. Hudson
      InterceptingProxy$1.invoke
      1. hudson.model.Executor$1.call(Executor.java:579)
      2. hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
      2 frames
    6. com.sun.proxy
      $Proxy91.setResult
      1. com.sun.proxy.$Proxy91.setResult(Unknown Source)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:483)
      3 frames
    8. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:320)
      2. hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:295)
      3. hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:254)
      4. hudson.remoting.UserRequest.perform(UserRequest.java:121)
      5. hudson.remoting.UserRequest.perform(UserRequest.java:49)
      6. hudson.remoting.Request$2.run(Request.java:324)
      7. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      7 frames
    9. org.jenkinsci.remoting
      CallableDecorator.call
      1. org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
      1 frame
    10. Hudson :: Remoting Layer
      CallableDecoratorList$1.call
      1. hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
      1 frame
    11. jenkins.util
      ContextResettingExecutorService$2.call
      1. jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      1 frame
    12. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames