harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6197) [classlib][lang-management] java.lang.management.ManagementFactory.getPlatformMBeanServer() throws a java.lang.Error
Date Wed, 14 Apr 2010 09:00:51 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856806#action_12856806
] 

Kevin Zhou commented on HARMONY-6197:
-------------------------------------

This problem may be caused by the NPE from MX4J.

> [classlib][lang-management] java.lang.management.ManagementFactory.getPlatformMBeanServer()
throws a java.lang.Error
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6197
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6197
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Kevin Zhou
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes it while HARMONY throws a java.lang.Error as follows:
> java.lang.Error: java.lang.NullPointerException
> 	at mx4j.server.MBeanMetaData$Factory.create(MBeanMetaData.java:181)
> 	at mx4j.server.MX4JMBeanServer.createMBeanMetaData(MX4JMBeanServer.java:779)
> 	at mx4j.server.MX4JMBeanServer.registerMBeanImpl(MX4JMBeanServer.java:764)
> 	at mx4j.server.MX4JMBeanServer.access$000(MX4JMBeanServer.java:97)
> 	at mx4j.server.MX4JMBeanServer$3.run(MX4JMBeanServer.java:796)
> 	at java.security.AccessController.doPrivilegedImpl(AccessController.java:112)
> 	at java.security.AccessController.doPrivileged(AccessController.java:75)
> 	at mx4j.server.MX4JMBeanServer.privilegedRegisterMBean(MX4JMBeanServer.java:792)
> 	at mx4j.server.MX4JMBeanServer.<init>(MX4JMBeanServer.java:175)
> 	at mx4j.server.MX4JMBeanServerBuilder.newMBeanServer(MX4JMBeanServerBuilder.java:53)
> 	at javax.management.MBeanServerBuilder.newMBeanServer(MBeanServerBuilder.java:54)
> 	at javax.management.MBeanServerFactory.createMBeanServerImpl(MBeanServerFactory.java:207)
> 	at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:44)
> 	at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:39)
> 	at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:299)
> [1] Test Case: 
>     public void test_ManagementFactory_getPlatformMBeanServer() {
>         ClassLoader savecl = (ClassLoader) AccessController
>                 .doPrivileged(new PrivilegedAction<ClassLoader>() {
>                     public ClassLoader run() {
>                         return Thread.currentThread().getContextClassLoader();
>                     }
>                 });
>         try {
>             MBeanServer mBeanServer = AccessController
>                     .doPrivileged(new PrivilegedAction<MBeanServer>() {
>                         public MBeanServer run() {
>                             Thread.currentThread().setContextClassLoader(null);
>                             return ManagementFactory.getPlatformMBeanServer();
>                         }
>                     });
>             assertNotNull(mBeanServer);
>         } finally {
>             final ClassLoader tmpsavecl = savecl;
>             AccessController.doPrivileged(new PrivilegedAction<Object>() {
>                 public Object run() {
>                     Thread.currentThread().setContextClassLoader(tmpsavecl);
>                     return null;
>                 }
>             });
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message