You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2015/02/11 10:57:00 UTC

[Bug 57567] New: JSR223 javascript missbehave on OpenJDK

https://issues.apache.org/bugzilla/show_bug.cgi?id=57567

            Bug ID: 57567
           Summary: JSR223 javascript missbehave on OpenJDK
           Product: JMeter
           Version: 2.11
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: shmulikk@gmail.com

The following JSR223 pre-processor, javascript code:
var now = new Date().toISOString();

Fail to run on OpenJDK 7 and return the following exception:
2015/02/11 09:16:39 ERROR - jmeter.modifiers.JSR223PreProcessor: Problem in
JSR223 script  javax.script.ScriptException:
sun.org.mozilla.javascript.EcmaError: TypeError: Cannot find function
toISOString in object Wed Feb 11 2015 09:16:39 GMT-0000 (UTC). (<Unknown
source>#3) in <Unknown source> at line number 3
        at
com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:224)
        at
com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:240)
        at
javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
        at
org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:202)
        at
org.apache.jmeter.modifiers.JSR223PreProcessor.process(JSR223PreProcessor.java:42)
        at
org.apache.jmeter.threads.JMeterThread.runPreProcessors(JMeterThread.java:749)
        at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:414)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
        at java.lang.Thread.run(Thread.java:745)
Caused by: sun.org.mozilla.javascript.EcmaError: TypeError: Cannot find
function toISOString in object Wed Feb 11 2015 09:16:39 GMT-0000 (UTC).
(<Unknown source>#3)
        at
sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
        at
sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
        at
sun.org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)
        at
sun.org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)
        at
sun.org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3743)
        at
sun.org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2247)
        at
sun.org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2214)
        at
sun.org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3143)
        at
sun.org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
        at
sun.org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
        at
sun.org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
        at
com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(RhinoScriptEngine.java:116)
        at
com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(RhinoScriptEngine.java:109)
        at
sun.org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
        at
sun.org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
        at sun.org.mozilla.javascript.Context.evaluateReader(Context.java:1135)
        at
com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:214)
        ... 8 more

Reproduced on RHEL + OpenJDK 7 + JMeter 2.11

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57567] JSR223 javascript misbehave on OpenJDK

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57567

shmulikk@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|JSR223 javascript           |JSR223 javascript misbehave
                   |missbehave on OpenJDK       |on OpenJDK

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57567] JSR223 javascript misbehave on OpenJDK

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57567

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Sebb <se...@apache.org> ---
Are you sure that OpenJDK 7 has the toISOString() method?

This does not look like a JMeter issue, nor even a RhinoScript issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.