JDK-8022698 : [TEST] javax/script/GetInterfaceTest.java fails since 7u45 b04 when run with jtreg -agentvm option
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.script
  • Affected Version: 7u45
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-08-09
  • Updated: 2014-02-12
  • Resolved: 2013-11-21
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 7
7u51Fixed
Description
Testsuite name: Regression
Test name: javax/script/GetInterfaceTest.java
JDK tested: 7u45 b04
OS tested: All

Test fails since 7u45 b04 and passes against 7u45 b03.

I suppose it is not a regression, but a test bug, because failure is reproduced only when run with JTREG 4.1 b06 and -agentvm option.

LOG:


#section:main
----------messages:(3/129)----------
command: main GetInterfaceTest
reason: Assumed action based on file name: run main GetInterfaceTest 
elapsed time (seconds): 0.1
----------System.out:(1/21)----------
this is run function
----------System.err:(14/818)----------
java.lang.SecurityException: attempt to implement non-public interface
	at com.sun.script.util.InterfaceImplementor.getInterface(InterfaceImplementor.java:92)
	at com.sun.script.javascript.RhinoScriptEngine.getInterface(RhinoScriptEngine.java:310)
	at GetInterfaceTest.main(GetInterfaceTest.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:728)
	at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.SecurityException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.SecurityException: attempt to implement non-public interface


test result: Failed. Execution failed: `main' threw exception: java.lang.SecurityException: attempt to implement non-public interface
Comments
jtreg uses a security manager (with AllPermissions) when agent VM mode is in use. Hence the exception only being seen there. Making the interfaces public as suggested by Sundar will work. I'll log a crucible review now and plan to push change to 7u-cpu once reviewed.
20-11-2013

this is still failing for 7u-cpu test runs! Is anyone looking at it ?? Please put it on ProblemList if not.
06-11-2013

We can put it in exclude list till we make those interfaces in GetInterfaceTest "public".
16-10-2013

The interfaces like Foo in that source have to made "public". That change is in jdk8. I remember that change was done in a CPU release of 7u as well. Need to check it out. In any case, it is a test only issue and not an issue with the rhino code in jdk7u45
16-10-2013

Still failing on jdk7u - when can we expect a fix ? If it's not soon, we need to put this test on the exclude list.
11-10-2013

It is a test bug
22-08-2013