I try to load two MBeans via the javax.management.loading.MLet class and the 
getMBeansFromURL method. 

I keep getting an StackOverflowError, I guess caused by some class loading 
problem.

This works on Sun AS 8.1 and on WebLogic 9.0...

Here is the mlet tags:

<MLET
        CODE=com.j2ee.jmx.J2ee.class
        ARCHIVE=j2ee-jmx.jar
        CODEBASE=/
        NAME=MLetTest:name=J2ee
>

<MLET
        CODE=com.j2ee.jmx.J2eeJmxNotificationListener.class
        ARCHIVE=j2ee-jmx.jar
        CODEBASE=/
        NAME=MLetTest:name=J2eeJmxNotificationListener
>



Some code:
        String domain = mBeanServer.getDefaultDomain();

        String mletClass = "javax.management.loading.MLet";
        ObjectName mletName = new ObjectName(domain + ":name=" + mletClass);
        if(!mBeanServer.isRegistered(mletName))
        {
            mBeanServer.createMBean(mletClass, mletName);
        }

        Object mletParams[] = {"http://localhost:8088/mlets.html"};
        String mletSignature[] = {"java.lang.String"};
        Set mbeanSet = (Set) mBeanServer.invoke(mletName, "getMBeansFromURL", 
mletParams, mletSignature);

I get the following error:
Caused by: java.lang.StackOverflowError
        at 
org.jboss.mx.loading.RepositoryClassLoader.hashCode(RepositoryClassLoader.java:718)
        at java.util.HashMap.hash(HashMap.java:257)
        at java.util.HashMap.containsKey(HashMap.java:335)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResourceFromCache(UnifiedLoaderRepository3.java:361)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResource(UnifiedLoaderRepository3.java:284)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResource(RepositoryClassLoader.java:518)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResourceLocally(RepositoryClassLoader.java:200)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResourceFromRepository(UnifiedLoaderRepository3.java:427)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResource(UnifiedLoaderRepository3.java:305)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResource(RepositoryClassLoader.java:518)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResourceLocally(RepositoryClassLoader.java:200)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResourceFromRepository(UnifiedLoaderRepository3.java:427)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResource(UnifiedLoaderRepository3.java:305)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResource(RepositoryClassLoader.java:518)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResourceLocally(RepositoryClassLoader.java:200)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResourceFromRepository(UnifiedLoaderRepository3.java:427)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResource(UnifiedLoaderRepository3.java:305)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResource(RepositoryClassLoader.java:518)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at java.lang.ClassLoader.getResource(ClassLoader.java:775)
        at 
org.jboss.mx.loading.RepositoryClassLoader.getResourceLocally(RepositoryClassLoader.java:200)
        at 
org.jboss.mx.loading.UnifiedLoaderRepository3.getResourceFromRepository(UnifiedLoaderRepository3.java:427)
....  This loops until the stack is overflowed.

Any ideas??

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3873066#3873066

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3873066


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to