AnsweredAssumed Answered

couldn't find a variable type that is able to serialize [object global] 'nashorn.global'

Question asked by jtmille3 on May 7, 2015
Latest reply on Jun 25, 2015 by jbarrez
My JavaScript task seems to have broken going from JDK7 to JDK8.  I know they swapped out the script engine from Rhino to Nashorn but now I am getting an error message any times to tries to run a ScriptTask.  It could be completely empty and will still fail with the same error message.  When I put a breakpoint in the activiti engine it's failing to find a default variable type for "nashorn.global"

JDK 1.8.0_25
Activiti 5.17.0

couldn't find a variable type that is able to serialize [object global]
org.activiti.engine.ActivitiException: couldn't find a variable type that is able to serialize [object global]
   at org.activiti.engine.impl.variable.DefaultVariableTypes.findVariableType(DefaultVariableTypes.java:62) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableInstance(VariableScopeImpl.java:690) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.createVariableInstance(ExecutionEntity.java:1171) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:604) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:591) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:485) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:442) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.scripting.ScriptBindings.put(ScriptBindings.java:83) ~[activiti-engine-5.17.0.jar:5.17.0]
   at jdk.nashorn.api.scripting.NashornScriptEngine.getNashornGlobalFrom(NashornScriptEngine.java:394) ~[nashorn.jar:na]
   at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:640) ~[nashorn.jar:na]
   at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:521) ~[nashorn.jar:na]
   at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:192) ~[nashorn.jar:na]
   at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[na:1.8.0_25]
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:87) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:73) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:63) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:80) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:116) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:35) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:450) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:428) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:140) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:66) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotificationsCompleted(AtomicOperationProcessStartInitial.java:45) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsCompleted(AtomicOperationProcessStart.java:62) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:631) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:626) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.start(ExecutionEntity.java:378) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:111) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57) ~[activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) [activiti-spring-5.17.0.jar:5.17.0]
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) [activiti-spring-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37) [activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) [activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) [activiti-engine-5.17.0.jar:5.17.0]
   at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:69) [activiti-engine-5.17.0.jar:5.17.0]
   at com.sas.fcs.tdc.services.WorkflowServiceTest.testFetchTasksForEntity(WorkflowServiceTest.java:189) [TDC/:na]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25]
   at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25]
   at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
   at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
   at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit-4.11.jar:na]
   at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.11.jar:na]
   at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.11.jar:na]
   at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.activiti.engine.test.ActivitiRule$1.evaluate(ActivitiRule.java:126) [activiti-engine-5.17.0.jar:5.17.0]
   at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.11.jar:na]
   at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [junit-4.11.jar:na]
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit-4.11.jar:na]
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit-4.11.jar:na]
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit-4.11.jar:na]
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit-4.11.jar:na]
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit-4.11.jar:na]
   at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.11.jar:na]
   at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
   at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:na]
   at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78) [junit-rt.jar:na]
   at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212) [junit-rt.jar:na]
   at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) [junit-rt.jar:na]

Outcomes