[Dev] 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:45:22 PST 2007
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!
java.lang.ClassCastException:
com.sun.script.javascript.RhinoScriptEngineFactory cannot be cast to
javax.script.ScriptEngineFactory
at javax.script.ScriptEngineManager.initEngines
(ScriptEngineManager.java:109)
at javax.script.ScriptEngineManager.access$000
(ScriptEngineManager.java:37)
at javax.script.ScriptEngineManager$1.run(ScriptEngineManager.java:80)
at java.security.AccessController.doPrivileged(Native Method)
at javax.script.ScriptEngineManager.init(ScriptEngineManager.java:78)
at javax.script.ScriptEngineManager.<init>(ScriptEngineManager.java:51)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.methodFrom
CallScript(ScriptRunner.java:325)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.methodFrom
Call(ScriptRunner.java:307)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.setupMetho
dForTest(ScriptRunner.java:251)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.setMethods
(ScriptRunner.java:237)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.<init>
(ScriptRunner.java:226)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.TestusecaseRunner.creat
eThread(TestusecaseRunner.java:483)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.TestusecaseRunner.creat
eUsecase(TestusecaseRunner.java:280)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.TestscenarioRunner.runU
secase(TestscenarioRunner.java:803)
at com.pushtotest.testnetwork.Scenario.run(Unknown Source)
at com.pushtotest.testnetwork.TestNode.doExecute(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:589)
at org.apache.axis.providers.java.RPCProvider.invokeMethod
(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage
(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke
(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit
(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:
453)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost
(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.axis.transport.http.AxisServletBase.service
(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:367)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:211)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest
(HttpConnection.java:503)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:841)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:361)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)
Thanks!
--
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 Dev
mailing list