cancel
Showing results for 
Search instead for 
Did you mean: 

script task runs in wrong context

m2spring
Champ in-the-making
Champ in-the-making
High-level context: This is part of my Activiti / Jenkins integration in the Jenkow plugin.  Kohsuke Kawaguchi has created a new Jenkins plugin which contains the Activiti Explorer UI, served out by Jenkins. We're now trying to get both working.

A simple workflow (user task is assigned to "kermit"):
[img]http://springdot.org/files/20121210-1721.png[/img]

When "kermit" completes the user task in the Explorer UI, I get this:

script task says 'hi' to stdout
Dec 10, 2012 5:17:19 PM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.activiti.engine.ActivitiException: problem evaluating script: javax.script.ScriptException: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:71)
   at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:51)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:65)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:115)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:381)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
   at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47)
   at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:92)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:364)
   at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:156)
   at org.activiti.engine.impl.cmd.CompleteTaskCmd.completeTask(CompleteTaskCmd.java:63)
   at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:57)
   at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:28)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:144)
   at org.activiti.explorer.ui.task.TaskDetailPanel$5.buttonClick(TaskDetailPanel.java:353)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
   at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
   at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
   at com.vaadin.ui.Button.fireClick(Button.java:539)
   at com.vaadin.ui.Button.changeVariables(Button.java:206)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
   at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
   at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at com.cloudbees.vietnam4j.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
   at com.cloudbees.vietnam4j.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
   at com.cloudbees.vietnam4j.ProxiedWebApplication.handleRequest(ProxiedWebApplication.java:186)
   at org.jenkinsci.plugins.activiti_explorer.ActivitiExplorer.doDynamic(ActivitiExplorer.java:63)
   at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
   at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
   at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
   at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:363)
   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
   at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
   at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
   at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
   at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
   at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
   at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: javax.script.ScriptException: javax.script.ScriptException: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:122)
   at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:216)
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:69)
   … 117 more
Caused by: javax.script.ScriptException: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:323)
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:116)
   … 119 more
Caused by: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:60)
   at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.getValue(VariableInstanceEntity.java:158)
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariable(VariableScopeImpl.java:93)
   at org.activiti.engine.impl.scripting.VariableScopeResolver.get(VariableScopeResolver.java:56)
   at org.activiti.engine.impl.scripting.ScriptBindings.get(ScriptBindings.java:62)
   at javax.script.SimpleScriptContext.getAttribute(SimpleScriptContext.java:150)
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl$1.getVariable(GroovyScriptEngineImpl.java:239)
   at groovy.lang.Script.getProperty(Script.java:54)
   at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
   at Script2.run(Script2.groovy:2)
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320)
   … 120 more
Caused by: java.lang.ClassNotFoundException: com.cisco.step.jenkins.plugins.jenkow.ConsoleLogger
   at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
   at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
   at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
   at com.cloudbees.vietnam4j.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401)
   at com.cloudbees.vietnam4j.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603)
   at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
   at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
   at org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:49)
   … 131 more
Dec 10, 2012 5:17:19 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: org.activiti.engine.ActivitiException: problem evaluating script: javax.script.ScriptException: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
   at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
   at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
   at com.vaadin.ui.Button.fireClick(Button.java:539)
   at com.vaadin.ui.Button.changeVariables(Button.java:206)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
   at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
   at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at com.cloudbees.vietnam4j.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
   at com.cloudbees.vietnam4j.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
   at com.cloudbees.vietnam4j.ProxiedWebApplication.handleRequest(ProxiedWebApplication.java:186)
   at org.jenkinsci.plugins.activiti_explorer.ActivitiExplorer.doDynamic(ActivitiExplorer.java:63)
   at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
   at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
   at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
   at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:363)
   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
   at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
   at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
   at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
   at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
   at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
   at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: org.activiti.engine.ActivitiException: problem evaluating script: javax.script.ScriptException: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:71)
   at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:51)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:65)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:115)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:381)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
   at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47)
   at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:92)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:364)
   at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:156)
   at org.activiti.engine.impl.cmd.CompleteTaskCmd.completeTask(CompleteTaskCmd.java:63)
   at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:57)
   at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:28)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:144)
   at org.activiti.explorer.ui.task.TaskDetailPanel$5.buttonClick(TaskDetailPanel.java:353)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
   … 58 more
Caused by: javax.script.ScriptException: javax.script.ScriptException: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:122)
   at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:216)
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:69)
   … 117 more
Caused by: javax.script.ScriptException: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:323)
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:116)
   … 119 more
Caused by: org.activiti.engine.ActivitiException: coudn't deserialize object in variable 'console'
   at org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:60)
   at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.getValue(VariableInstanceEntity.java:158)
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariable(VariableScopeImpl.java:93)
   at org.activiti.engine.impl.scripting.VariableScopeResolver.get(VariableScopeResolver.java:56)
   at org.activiti.engine.impl.scripting.ScriptBindings.get(ScriptBindings.java:62)
   at javax.script.SimpleScriptContext.getAttribute(SimpleScriptContext.java:150)
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl$1.getVariable(GroovyScriptEngineImpl.java:239)
   at groovy.lang.Script.getProperty(Script.java:54)
   at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
   at Script2.run(Script2.groovy:2)
   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320)
   … 120 more
Caused by: java.lang.ClassNotFoundException: com.cisco.step.jenkins.plugins.jenkow.ConsoleLogger
   at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
   at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
   at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
   at com.cloudbees.vietnam4j.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401)
   at com.cloudbees.vietnam4j.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603)
   at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
   at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
   at org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:49)
   … 131 more

Here's my understanding what's happening:
The workflow engine has been running in a different thread, where the ConsoleLogger class is visible.
When the Explorer completes the user task, the very same thread also tries to execute the the script task.
This fails, because it's in a different context where the ConsoleLogger class is not visible.

What's the suggested remedy?
Is it possible to have an implicit task in front of the script task to avoid the Explorer thread from entering the script task?
Or, should I try to make the Explorer task see the same classes as the "engine" thread?

Your advice would be highly appreciated.
Thanks!
-Max
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
The workflow engine has been running in a different thread, where the ConsoleLogger class is visible.
When the Explorer completes the user task, the very same thread also tries to execute the the script task.
This fails, because it's in a different context where the ConsoleLogger class is not visible.

So do I understand it correctly: 'console' is a process variable, right? And when the variable is deserialized in the script task, the class is not found?

Is it possible to have an implicit task in front of the script task to avoid the Explorer thread from entering the script task?
Or, should I try to make the Explorer task see the same classes as the "engine" thread?

To understand what goes wrong, I need some more information on how Explorer is included in Jenkins. Explorer just access the process engine. So it sounds very strange that it doesn't know the class. I don't think threading is the problem here, but I can't be sure until I know how the integration is done.

m2spring
Champ in-the-making
Champ in-the-making
So do I understand it correctly: 'console' is a process variable, right? And when the variable is deserialized in the script task, the class is not found?
Correct.
To understand what goes wrong, I need some more information on how Explorer is included in Jenkins. Explorer just access the process engine. So it sounds very strange that it doesn't know the class. I don't think threading is the problem here, but I can't be sure until I know how the integration is done.
I'm so far unable to reproduce the problem in a junit test.
We're constructing the Activiti Explorer's context here:
https://github.com/jenkinsci/activiti-explorer-plugin/blob/master/plugin/src/main/java/org/jenkinsci...
The involved class loaders do contain the class which is later missing when the script task tries to access it.
Still trying out some more options…
-Max

jbarrez
Star Contributor
Star Contributor
Freaky stuff, makes no real sense why it doesnt do what it should do 😞

Without much more to go with, I'm afraid I'm of not much help at the moment …

m2spring
Champ in-the-making
Champ in-the-making
Kohsuke found a way that the Jenkow plugin's engine object can be used by the Acitiviti Explorer plugin.
Now it works as intended.
-Max

jbarrez
Star Contributor
Star Contributor
Awesome! Keep us posted on the progress! Looking forward to use it!
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.