[ptt-users] Exception prevents running non-jython test scripts on Apple's Java 6.0 JVM

Olivier Dony olivier.dony at denali.be
Tue Dec 11 08:57:19 PST 2007


On Dec 11, 2007, at 5:45 PM, Olivier Dony wrote:

> Dear all,
>
> We have been trying to run Groovy test scripts using the latest  
> version of TestMaker (updated from CVS just now) on Mac Os X.
>
> It is apparently mandatory to use a java 6 JVM for the jetty-based  
> testnodes, as a lot of JAR dependencies are compiled for 6.0 (e.g.  
> browserjs-engine.jar, groovy-engine.jar, etc.).
> However when the TestNode is started using the Apple JVM 6.0 (the  
> one and only developer preview release), it fails to execute our  
> groovy script due to the ClassCastException below.
>
> Note that the script runs fine within TestMaker when executed  
> locally through the Agent->'Run Script locally...' menu.
> It also works when we use a jython script, presumably because the  
> TestRunner does something different for jython than for other  
> scripting languages, in methodFromCallScript().
>
> The issue could be a conflict due to duplicate JSR-223 APIs in the  
> classpath, similarly to the issue described on this page : http:// 
> weblogs.java.net/blog/robc/archive/2007/03/using_phobos_wi.html#c27286
> (however simply removing the script-api.jar from the webapp libs  
> doesn't work)
>
> We are still trying to work around this issue, so any help/thoughts  
> are welcome!


Well, it turns out that jython.jar does contain a "javax/script/ 
ScriptEngineFactory.class" file that conflicts with the JVM's one in  
our case.
The groovy test seems to run if I remove the "jython.jar" from the  
web-app's lib dir in jetty, which is ok as long as I don't need to  
run jython-based tests.

Maybe the developers could look into removing the conflicting classes  
from jython.jar for TM 5.1, if this doesn't break anything else?


Cheers,


--
Olivier Dony

Denali s.a., "Bridging the gap between Business and IT"
Rue de Clairvaux 8, B-1348 Louvain-la-Neuve, Belgium
Office: +32 10 43 99 51  Fax: +32 10 43 99 52
www.denali.be

Legal Notice: This message may contain confidential and/or privileged  
information. If you are not the addressee or authorized to receive  
this for the addressee, you must not use, copy, disclose or take any  
action based on this message or any information herein. If you have  
received this message by mistake, please advise the sender  
immediately by return e-mail and delete this message from your  
system. Thank you for your cooperation.



More information about the Users mailing list