cancel
Showing results for 
Search instead for 
Did you mean: 

Rhino Tomcat8 JDK 7 / Not working

martinfranz
Champ in-the-making
Champ in-the-making
Hey all,

After migrating my running Explorer and REST (both 5.16) from Tomcat 7.x to Tomcat 8.x
the Script Tasks are not running anymore. Especially if I use: importPackage(java.lang) or anything else …   

I did not touch the jdk. As i know that rhino works slightly different with jdk 8.

java.lang.StringIndexOutOfBoundsException: String index out of range: 3
at java.lang.String.charAt(String.java:658)
at org.apache.catalina.loader.WebappClassLoaderBase.filter(WebappClassLoaderBase.java:2780)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1253)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
at sun.org.mozilla.javascript.internal.Kit.classOrNull(Kit.java:92)

Has anyone any idea?

Best regards,

Martin
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Martin,

There are differences between javascript engines shipped with java 6/7 (http://activiti.org/userguide/index.html#explorer.reporting.example). There were some questions related to javascript engines already on the forum. You can have a look on the examples how the difference was solved there.

Regards
Martin

Hi Martin,

Thanks for your answer! Yes, I noticed that there  are differences between the JDK's.
I my case I did not touch the JDK.
I work with:
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

What is curious: This setup works perfectly on Tomcat7x. But on Tomcat8x. it seems that the importPackage command fails.

… I role back to Tomcat7 now and start with further tests and keep you updated 🙂

Best regards from Nuremberg.

jbarrez
Star Contributor
Star Contributor
Tomcat shouldn't do anything special wrt scripting or JDK. You sure the JAVA_HOME variable points to the same java install for both tomcats?