Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
Sun JDK 1.6
Description
Script mediator does not work on Sun JDK 1.6 as discovered by the script mediator serialization test.
org.apache.synapse.SynapseException: Exception initializing inline script
at org.apache.synapse.mediators.bsf.ScriptMediator.initInlineScript(ScriptMediator.java:287)
at org.apache.synapse.mediators.bsf.ScriptMediator.<init>(ScriptMediator.java:123)
at org.apache.synapse.mediators.bsf.ScriptMediatorFactory.createMediator(ScriptMediatorFactory.java:93)
at org.apache.synapse.config.xml.MediatorFactoryFinder.getMediator(MediatorFactoryFinder.java:180)
at org.apache.synapse.mediators.AbstractTestCase.serialization(AbstractTestCase.java:83)
at org.apache.synapse.mediators.bsf.ScriptMediatorSerializationTest.testInlineScriptMediatorSerializationScenarioOne(ScriptMediatorSerializationTest.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: XML runtime not available (<Unknown Source>#1)
at com.sun.script.javascript.RhinoScriptEngine.compile(RhinoScriptEngine.java:272)
at com.sun.script.javascript.RhinoScriptEngine.compile(RhinoScriptEngine.java:254)
at org.apache.synapse.mediators.bsf.ScriptMediator.initInlineScript(ScriptMediator.java:276)
... 26 more
Caused by: sun.org.mozilla.javascript.internal.EvaluatorException: XML runtime not available (<Unknown Source>#1)
at sun.org.mozilla.javascript.internal.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:84)
at sun.org.mozilla.javascript.internal.DefaultErrorReporter.error(DefaultErrorReporter.java:71)
at sun.org.mozilla.javascript.internal.Parser.addError(Parser.java:111)
at sun.org.mozilla.javascript.internal.Parser.reportError(Parser.java:117)
at sun.org.mozilla.javascript.internal.Parser.mustHaveXML(Parser.java:210)
at sun.org.mozilla.javascript.internal.Parser.memberExprTail(Parser.java:1653)
at sun.org.mozilla.javascript.internal.Parser.memberExpr(Parser.java:1632)
at sun.org.mozilla.javascript.internal.Parser.unaryExpr(Parser.java:1492)
at sun.org.mozilla.javascript.internal.Parser.mulExpr(Parser.java:1421)
at sun.org.mozilla.javascript.internal.Parser.addExpr(Parser.java:1402)
at sun.org.mozilla.javascript.internal.Parser.shiftExpr(Parser.java:1382)
at sun.org.mozilla.javascript.internal.Parser.relExpr(Parser.java:1356)
at sun.org.mozilla.javascript.internal.Parser.eqExpr(Parser.java:1312)
at sun.org.mozilla.javascript.internal.Parser.bitAndExpr(Parser.java:1301)
at sun.org.mozilla.javascript.internal.Parser.bitXorExpr(Parser.java:1290)
at sun.org.mozilla.javascript.internal.Parser.bitOrExpr(Parser.java:1279)
at sun.org.mozilla.javascript.internal.Parser.andExpr(Parser.java:1267)
at sun.org.mozilla.javascript.internal.Parser.orExpr(Parser.java:1255)
at sun.org.mozilla.javascript.internal.Parser.condExpr(Parser.java:1238)
at sun.org.mozilla.javascript.internal.Parser.assignExpr(Parser.java:1220)
at sun.org.mozilla.javascript.internal.Parser.variables(Parser.java:1196)
at sun.org.mozilla.javascript.internal.Parser.statementHelper(Parser.java:1007)
at sun.org.mozilla.javascript.internal.Parser.statement(Parser.java:608)
at sun.org.mozilla.javascript.internal.Parser.parse(Parser.java:340)
at sun.org.mozilla.javascript.internal.Parser.parse(Parser.java:299)
at sun.org.mozilla.javascript.internal.Context.compileImpl(Context.java:2196)
at sun.org.mozilla.javascript.internal.Context.compileReader(Context.java:1252)
at sun.org.mozilla.javascript.internal.Context.compileReader(Context.java:1224)
at com.sun.script.javascript.RhinoScriptEngine.compile(RhinoScriptEngine.java:268)
... 28 more
Synapse picks up the JS engine in the JDK and not to the one in the BSF jar.