JDK-7073296 : (reflect) Generalization of Constructor and Method lead to problems with StandardMBean.invoke
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-07-31
  • Updated: 2012-12-21
  • Resolved: 2012-05-13
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 8
8 b01Fixed
Related Reports
Relates :  
Description
The changes for "7007535: (reflect) Please generalize Constructor and Method" appears to be causing the following tests to fail:

java/lang/management/ManagementFactory/ProxyTypeMapping.java
java/lang/management/ManagementFactory/ThreadMXBeanProxy.java
java/lang/management/ManagementFactory/ValidateOpenTypes.java
java/lang/management/ThreadMXBean/ThreadInfoArray.java
javax/management/mxbean/MBeanOperationInfoTest.java
javax/management/mxbean/OverloadTest.java
javax/management/mxbean/ThreadMXBeanTest.java
javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java

I have not examined the failures in any detail and this could turn out to be a latent bug in JMX. However as this is a potential regression, and is causing JPRT jobs to fail, then it needs to be diagnosed quickly.


--------------------------------------------------
TEST: java/lang/management/ManagementFactory/ProxyExceptions.java
JDK under test: (/tmp/jprt/P1/161242.ab23780/testproduct/solaris_sparc_5.10-product)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-201107311612.ab23780.jdk-b00)
Java HotSpot(TM) Client VM (build 21.0-b14, mixed mode)

ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.049 seconds
messages:
command: build ProxyExceptions
reason: Named class compiled on demand
elapsed time (seconds): 0.049

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.049 seconds
messages:
command: compile /tmp/jprt/P1/161242.ab23780/source/test/java/lang/management/ManagementFactory/ProxyExceptions.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.049

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.reflect.UndeclaredThrowableException
REASON: Assumed action based on file name: run main ProxyExceptions 
TIME:   0.01 seconds
messages:
command: main ProxyExceptions
reason: Assumed action based on file name: run main ProxyExceptions 
elapsed time (seconds): 0.01
STDOUT:
STDERR:
java.lang.reflect.UndeclaredThrowableException
	at $Proxy67.getThreadInfo(Unknown Source)
	at ProxyExceptions.main(ProxyExceptions.java:108)
	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:473)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
	at java.lang.Thread.run(Thread.java:722)
Caused by: javax.management.ReflectionException: Operation getThreadInfo exists but not with this signature: (long, int)
	at com.sun.jmx.mbeanserver.PerInterface.noSuchMethod(PerInterface.java:170)
	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:135)
	at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:250)
	at javax.management.StandardMBean.invoke(StandardMBean.java:405)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
	at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150)
	at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:265)
	... 8 more
Caused by: java.lang.NoSuchMethodException: getThreadInfo(long, int)
	at com.sun.jmx.mbeanserver.PerInterface.noSuchMethod(PerInterface.java:168)
	... 16 more

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


TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.reflect.UndeclaredThrowableException
--------------------------------------------------

Comments
WORK AROUND http://hg.openjdk.java.net/jdk8/tl/jdk/rev/565555e89034
04-08-2011

SUGGESTED FIX http://cr.openjdk.java.net/~mduigou/7073296/0/webrev/
02-08-2011

EVALUATION Bug in equalParamTypes; needs to be fixed.
02-08-2011