JDK-8239361 : javax/script/Test7.java failed due to ScriptException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.script
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2020-02-18
  • Updated: 2022-11-29
  • Resolved: 2020-04-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 15
15Resolved
Related Reports
Relates :  
Sub Tasks
JDK-8240134 :  
Description
The following test failed in the JDK15 CI:

javax/script/Test7.java

Here's a snippet from the log file:

----------System.err:(38/3697)*----------
Warning: Nashorn engine is planned to be removed from a future JDK release
javax.script.ScriptException: TypeError: Can not create new object with constructor java.io.BufferedReader with the passed arguments; they do not match any of its method signatures. in <eval> at line number 11
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:477)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:461)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:157)
	at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
	at Test7.main(Test7.java:50)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: <eval>:11 TypeError: Can not create new object with constructor java.io.BufferedReader with the passed arguments; they do not match any of its method signatures.
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornStaticClassLinker.checkNullConstructor(NashornStaticClassLinker.java:116)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornStaticClassLinker.getGuardedInvocation(NashornStaticClassLinker.java:104)
	at jdk.dynalink/jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:161)
	at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:109)
	at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(LinkerServicesImpl.java:137)
	at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(LinkerServicesImpl.java:168)
	at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:135)
	at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:242)
	at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$2$\\^eval\\_/0x000000010021f840.:program(<eval>:11)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
	... 11 more

JavaTest Message: Test threw exception: javax.script.ScriptException
JavaTest Message: shutting down test

----------System.out:(3/9)----------

Test7

result: Failed. Execution failed: `main' threw exception: javax.script.ScriptException: TypeError: Can not create new object with constructor java.io.BufferedReader with the passed arguments; they do not match any of its method signatures. in <eval> at line number 11


test result: Failed. Execution failed: `main' threw exception: javax.script.ScriptException: TypeError: Can not create new object with constructor java.io.BufferedReader with the passed arguments; they do not match any of its method signatures. in <eval> at line number 11
Comments
javax/script/Test7.java is on the ProblemList with this JBS issue as the reason. Should it be removed?
29-11-2022

Nashorn has been removed in JDK 15 ( JDK-8241749 )
17-04-2020