United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8022698 [TEST] javax/script/GetInterfaceTest.java fails since 7u45 b04 when run with jtreg -agentvm option
JDK-8022698 : [TEST] javax/script/GetInterfaceTest.java fails since 7u45 b04 when run with jtreg -agentvm option

Details
Type:
Bug
Submit Date:
2013-08-09
Status:
Resolved
Updated Date:
2014-01-02
Project Name:
JDK
Resolved Date:
2013-11-21
Component:
core-libs
OS:
generic
Sub-Component:
javax.script
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u45
Fixed Versions:
7u55 (b01)

Related Reports
Backport:
Backport:

Sub Tasks

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
It is a test bug
                                     
2013-08-22
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.
                                     
2013-10-11
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

                                     
2013-10-16
We can put it in exclude list till we make those interfaces in GetInterfaceTest "public".
                                     
2013-10-16
this is still failing for 7u-cpu test runs! Is anyone looking at it ?? Please put it on ProblemList if not.
                                     
2013-11-06
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.
                                     
2013-11-20



Hardware and Software, Engineered to Work Together