AnsweredAssumed Answered

sun.org.mozilla.javascript.EcmaError: ReferenceError: 'JSON' is not defined.

Question asked by phazlett on Aug 20, 2014
Latest reply on Aug 30, 2014 by jbarrez
I'm an Activiti newbie and have a problem with the demo Employee Productivity report. The other reports work correctly but accessing the Employee Productivity report yields the stack trace shown below.

My setup is:

Amazon AWS EC2 running Amazon Linux distro
Apache-Tomcat 8.0.9
Activiti 5.16.1
OpenJDK 1.7.0_65 (64-bit)
MySQL 5.5-1.6

I did find a similar post but the answer there doesn't seem to help my situation. Can anyone point me in the right direction for fixing this error?

Regards,
Paul


10:11:08,240 [http-nio-80-exec-1] WARN  org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior  - Exception while executing generateDataset : problem evaluating script: sun.org.mozilla.javascript.EcmaError: ReferenceError: "JSON" is not defined.
20-Aug-2014 10:11:08.244 SEVERE [http-nio-80-exec-1] null.null Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in org.activiti.explorer.ui.form.FormPropertiesForm$1 failed.
  at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
  at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
  at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
  at com.vaadin.ui.Button.fireClick(Button.java:567)
  at com.vaadin.ui.Button.changeVariables(Button.java:223)
  at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460)
  at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404)
  at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329)
  at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761)
  at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:325)
  at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:44)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
  at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
  at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  at java.lang.Thread.run(Thread.java:745)
Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method componentEvent in org.activiti.explorer.ui.reports.ReportDetailPanel$2 failed.
  at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
  at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
  at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
  at org.activiti.explorer.ui.form.FormPropertiesForm.access$000(FormPropertiesForm.java:45)
  at org.activiti.explorer.ui.form.FormPropertiesForm$1.buttonClick(FormPropertiesForm.java:139)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
  … 36 more
Caused by: org.activiti.engine.ActivitiException: problem evaluating script: sun.org.mozilla.javascript.EcmaError: ReferenceError: "JSON" is not defined.
  at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:89)
  at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:73)
  at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:63)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  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:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:80)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:116)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:35)
  at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:440)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:418)
  at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:131)
  at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:64)
  at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
  at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotificationsCompleted(AtomicOperationProcessStartInitial.java:45)
  at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsCompleted(AtomicOperationProcessStart.java:62)
  at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
  at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
  at org.activiti.engine.impl.persistence.entity.ExecutionEntity.start(ExecutionEntity.java:368)
  at org.activiti.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:56)
  at org.activiti.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:29)
  at org.activiti.engine.impl.cmd.NeedsActiveProcessDefinitionCmd.execute(NeedsActiveProcessDefinitionCmd.java:52)
  at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
  at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
  at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
  at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
  at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
  at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
  at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
  at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
  at org.activiti.engine.impl.FormServiceImpl.submitStartFormData(FormServiceImpl.java:62)
  at org.activiti.explorer.ui.reports.ReportDetailPanel.startProcessInstanceWithFormProperties(ReportDetailPanel.java:183)
  at org.activiti.explorer.ui.reports.ReportDetailPanel$2.handleFormSubmit(ReportDetailPanel.java:164)
  at org.activiti.explorer.ui.form.FormPropertiesEventListener.componentEvent(FormPropertiesEventListener.java:39)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
  … 45 more
Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError: ReferenceError: "JSON" is not defined.
  at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:224)
  at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:240)
  at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
  at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:87)
  … 122 more
Caused by: sun.org.mozilla.javascript.EcmaError: ReferenceError: "JSON" is not defined.
  at sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
  at sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
  at sun.org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717)
  at sun.org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1692)
  at sun.org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3410)
  at sun.org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
  at sun.org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
  at sun.org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
  at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(RhinoScriptEngine.java:116)
  at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(RhinoScriptEngine.java:109)
  at sun.org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
  at sun.org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
  at sun.org.mozilla.javascript.Context.evaluateReader(Context.java:1135)
  at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:214)
  … 125 more

Outcomes