JDK-7056447 : test/java/lang/management/ManagementFactory/MBeanServerMXBeanUnsupportedTest.java fails in agentvm
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-06-18
  • Updated: 2017-11-16
  • Resolved: 2011-07-06
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 6 JDK 7 JDK 8
6u191Fixed 7u40Fixed 8 b01Fixed
Description
If the java/lang/** tests are run with the jtreg -agentvm mode then this test fails with a CNF. As this test relies on the javax.management.builder.initial property then it may need to be change to run in othervm mode.


#Test Results (version 2)
#Sat Jun 18 17:39:46 BST 2011
#checksum:1131d11857e916e4
#-----testdescription-----
$file=/net/rialto/export/Users/ab23780/ws/TL7/jdk/test/java/lang/management/ManagementFactory/MBeanServerMXBeanUnsupportedTest.java
$root=/net/rialto/export/Users/ab23780/ws/TL7/jdk/test
author=Luis-Miguel Alventosa
keywords=bug6403794
run=USER_SPECIFIED clean MBeanServerMXBeanUnsupportedTest\nUSER_SPECIFIED build MBeanServerMXBeanUnsupportedTest\nUSER_SPECIFIED main MBeanServerMXBeanUnsupportedTest\n
source=MBeanServerMXBeanUnsupportedTest.java
title=Test that all the platform MXBeans are wrapped in StandardMBean so an MBeanServer which does not have support for MXBeans can be used.

#-----environment-----

#-----testresult-----
description=file:/net/rialto/export/Users/ab23780/ws/TL7/jdk/test/java/lang/management/ManagementFactory/MBeanServerMXBeanUnsupportedTest.java
elapsed=315 0:00:00.315
end=Sat Jun 18 17:39:46 BST 2011
environment=regtest
execStatus=Failed. Execution failed: `main' threw exception: javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl: java.lang.ClassNotFoundException: MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl
hostname=marino.ireland.sun.com
javatestOS=SunOS 5.10 (x86)
javatestVersion=4.1.4
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages clean build compile build main
start=Sat Jun 18 17:39:45 BST 2011
test=java/lang/management/ManagementFactory/MBeanServerMXBeanUnsupportedTest.java
work=/export/Scratch/ab23780/JTwork/java/lang/management/ManagementFactory

#section:script_messages
----------messages:(4/196)----------
JDK under test: (/java/re/jdk/7/latest/binaries/solaris-i586)
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b145)
Java HotSpot(TM) Server VM (build 21.0-b15, mixed mode)

#section:clean
----------messages:(3/151)----------
command: clean MBeanServerMXBeanUnsupportedTest
reason: User specified action: run clean MBeanServerMXBeanUnsupportedTest 
elapsed time (seconds): 0.0
result: Passed. Clean successful

#section:build
----------messages:(3/153)----------
command: build MBeanServerMXBeanUnsupportedTest
reason: User specified action: run build MBeanServerMXBeanUnsupportedTest 
elapsed time (seconds): 0.175
result: Passed. Build successful

#section:compile
----------messages:(3/223)----------
command: compile /net/rialto/export/Users/ab23780/ws/TL7/jdk/test/java/lang/management/ManagementFactory/MBeanServerMXBeanUnsupportedTest.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.173
result: Passed. Compilation successful

#section:build
----------messages:(3/117)----------
command: build MBeanServerMXBeanUnsupportedTest
reason: Named class compiled on demand
elapsed time (seconds): 0.117
result: Passed. All files up to date

#section:main
----------messages:(3/151)----------
command: main MBeanServerMXBeanUnsupportedTest
reason: User specified action: run main MBeanServerMXBeanUnsupportedTest 
elapsed time (seconds): 0.022
----------System.out:(1/22)----------
>>> Unhappy Bye, Bye!
----------System.err:(29/2093)----------
javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl: java.lang.ClassNotFoundException: MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl
	at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:502)
	at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:538)
	at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:315)
	at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:230)
	at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:191)
	at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:466)
	at MBeanServerMXBeanUnsupportedTest.main(MBeanServerMXBeanUnsupportedTest.java:158)
	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:601)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:445)
	at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:487)
	... 12 more

JavaTest Message: Test threw exception: javax.management.JMRuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl: java.lang.ClassNotFoundException: MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl


test result: Failed. Execution failed: `main' threw exception: javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl: java.lang.ClassNotFoundException: MBeanServerMXBeanUnsupportedTest$MBeanServerBuilderImpl

Comments
EVALUATION This test needs to run in its own VM.
22-06-2011