Indeed, It works fine with java5. (both the example, as my own stuff) On Wed, Oct 1, 2008 at 4:42 PM, Ruwan Linton <[EMAIL PROTECTED]> wrote:
> Hi Harm, > > I am afraid, Script mediator will not work on Java 6, because it > conflicts with the BSF (Bean Scripting Framework) library that we are > using to enable scripts on Java. The root cause is that Java 6 has > native support for evaluating scripts but our scripting mediator is > using something else. > > Thanks, > Ruwan > > Harm Verhagen wrote: > > Hi, > > > > I was fiddling with javascript mediators, and I keep on getting the > > following exceptions. > > - javax.script.ScriptException: > > sun.org.mozilla.javascript.internal.EvaluatorException: XML runtime > > not available > > *or* > > The script engine returned a NoSuchMethodException executing the > > external js script : Scripts/test.js function transformRequest > > > > Note: sometimes the javascript runs correctly, NO ERRORS, then I hit > > 'Update' in the configuration webui -> and then the exceptions above > > occur. (no logic in it, sometimes the first, sometimes the 2nd, > > sometimes no problem). > > (without editing the javascript, without changing any configuration). > > > > > > > > *example 350* > > I then tried your example 350. > > Here I also get similar exceptions. > > Anyone any idea? > > > > Errors when runnign example 350 > > 2008-10-01 15:59:36,290 [127.0.0.1-vloeki_v01] [HttpServerWorker-1] > > DEBUG ScriptMediator Scripting language : js source loaded with key > > : stockquoteScript function : transformRequest > > 2008-10-01 15:59:36,309 [127.0.0.1-vloeki_v01] [HttpServerWorker-1] > > ERROR ScriptMediator The script engine returned an error executing t > > he external js script : stockquoteScript function transformRequest > > javax.script.ScriptException: > > sun.org.mozilla.javascript.internal.EvaluatorException: XML runtime > > not available (<Unknown source>#21) in > > <Unknown source> at line number 21 > > at > > > com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:110) > > at > > javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:232) > > at > > > org.apache.synapse.mediators.bsf.ScriptMediator.prepareExternalScript(ScriptMediator.java:313) > > at > > > org.apache.synapse.mediators.bsf.ScriptMediator.mediateWithExternalScript(ScriptMediator.java:227) > > at > > > org.apache.synapse.mediators.bsf.ScriptMediator.invokeScript(ScriptMediator.java:193) > > at > > > org.apache.synapse.mediators.bsf.ScriptMediator.mediate(ScriptMediator.java:168) > > at > > > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:58) > > at > > > org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:60) > > at > > > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:58) > > at > > > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:125) > > at > > > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:176) > > at > > > org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:89) > > at > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) > > at > > > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) > > at > > > org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:253) > > at > > > org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) > > at java.lang.Thread.run(Thread.java:619) > > > > > > > > system: > > debian > > wso2esb v1.7.1 > > sun java6 > > > > > > Mvg, > > Harm > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Esb-java-user mailing list > > [email protected] > > http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user > > > > > _______________________________________________ > Esb-java-user mailing list > [email protected] > http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user >
_______________________________________________ Esb-java-user mailing list [email protected] http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
