Custom MLet loading
jamesx Apr 2, 2002 6:14 PMHi,
I try to run some sample code introduced in JBoss Document
<<How to Integrate Custom Services via MBeans>>. I did the following steps:
1. Compile the sample code and jar them and out them into jboss\lib\ext dir
Then I config the following two files
1. jboss.jcml with the following section at cusom Mbean section:
-----------------------------------
<mbean code ="JNDIMap" name=":service=JNDIMap, jndiName = inmemory/maps/MapTest">
<attribute name="jndiName">inmemory/maps/MapTest</attribute>
</mbean>
1. jboss.conf
<MLET CODE = "com.xxx.JNDIMap" ARCHIVE="jndiname.jar" CODEBASE="../../lib/ext/">
</MLET>
When I start JBoss, I met following error
java.lang.IllegalArgumentException: No object name specified
at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.ja
va:528)
at javax.management.loading.MLet.getMBeansFromURL(MLet.java:523)
at javax.management.loading.MLet.getMBeansFromURL(MLet.java:369)
at org.jboss.Main.<init>(Main.java:180)
at org.jboss.Main$1.run(Main.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:106)
[ERROR,ConfigurationService] Could not create MBean :service=JNDIMap,jndiName=in
memory/maps/MapTest(JNDIMap)
java.lang.NoClassDefFoundError: JNDIMap (wrong name: com/camitro/ng/CustomServic
e/JNDIMap)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at javax.management.loading.MLet.findClass(MLet.java:775)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at com.sun.management.jmx.MBeanServerImpl.findClass(MBeanServerImpl.java
:2466)
at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.ja
va:751)
at org.jboss.configuration.ConfigurationService.create(ConfigurationServ
ice.java:683)
at org.jboss.configuration.ConfigurationService.loadConfiguration(Config
urationService.java:461)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
28)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at org.jboss.Main.<init>(Main.java:200)
at org.jboss.Main$1.run(Main.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:106)