03-02-2017 09:41 AM
Hi !
Facing a strange issue with Activiti 5.22.0 version.
I am ran fresh installation of activiti explorer with h2 and mysql databases. With both databases, when I try to start any demo process like "Employee Productivity" or generate any report, I get following Warning message popup on screen :
Warning!
problem evaluating script: Reference Error: "importPackage" is not defined in at line no 3.
I have attached the error snapshot and all the log files for reference.
I am running application on Windows 7 Professional 64bit, with Java jdk1.8.0_91
Any idea why the problem might be occurring.
03-02-2017 04:22 PM
Hello logicallimit _ ,
Currently I don't have the best news:
It appears as though this error is a generic problem that occurs with the javascript executor used inside of Activiti, and Java8. As seen in the following bug reports:
There are plenty more, but my point is that this isn't an Activiti specific error - it's a compatibility problem between Java8 and the script executor that Activiti is using. There are a couple of fixes for different applications other than Activiti, specifically, listed in those first two links.
If you're able to use Java7, this will work just fine without any alterations - give that a try first, by changing the JAVA_HOME on your system to point to a Java7 runtime, then restart Tomcat/whatever-server-being-used (which will then use the Java7 runtime and everything should work).
If Java8 is required, please comment back and I'll dig a little bit for potential fixes.
-JEarles
03-02-2017 04:22 PM
Hello logicallimit _ ,
Currently I don't have the best news:
It appears as though this error is a generic problem that occurs with the javascript executor used inside of Activiti, and Java8. As seen in the following bug reports:
There are plenty more, but my point is that this isn't an Activiti specific error - it's a compatibility problem between Java8 and the script executor that Activiti is using. There are a couple of fixes for different applications other than Activiti, specifically, listed in those first two links.
If you're able to use Java7, this will work just fine without any alterations - give that a try first, by changing the JAVA_HOME on your system to point to a Java7 runtime, then restart Tomcat/whatever-server-being-used (which will then use the Java7 runtime and everything should work).
If Java8 is required, please comment back and I'll dig a little bit for potential fixes.
-JEarles
03-03-2017 01:51 AM
Thanks for replying Jonathan. By looking at discussions on the link you shared, I felt this issue is a long standing one!
However, I think, I can downgrade to Java 1.7 for my application to work smoothly.
But I believe, this issue would certainly need a fix soon as JDK 8 is being adapted across industry rapidly.
-Devanshu
03-03-2017 03:03 AM
Activiti Explorer works just fine with Java 7. I tested it with Activiti 5.22.0, h2 database and tomcat 8.
However, one would also need to update the jre that tomcat uses.
For a Tomcat installation which is installed as a service (on Windows), we can change the version of JRE that runs Tomcat by configuring the Java Virtual Machine setting in the Tomcat service manager program (e.g. \Tomcat 8.0\bin\Tomcat7w.exe), as follows:
1. Double click to open the Tomcat Service Window. (Ensure Tomcat is not running)
2. Go to Java Tab
3. Change the path of Java Virtual Machine to point to jvm.dll file of jre7.
e.g., C:\Program Files\Java\jre7\bin\server\jvm.dll
4. Click OK to exit.
5. Start Tomcat and run Activiti Explorer to check if it works fine.
Explore our Alfresco products with the links below. Use labels to filter content by product module.