I have java class files stored in classes folder which is not in the classpath and i added the classpath in a seperate batch file as folows
JBOSS_CLASSPATH=%C:/CLASSES%
And I ran in to the following
Failed to boot JBoss: java.lang.RuntimeException: Cannot create MBeanServer at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:224) at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:56) at javax.management.MBeanServerFactory.createMBeanServerImpl(MBeanServerFactory.java:207) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:44) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:369) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315) at org.jboss.Main.boot(Main.java:195) at org.jboss.Main$1.run(Main.java:463) at java.lang.Thread.run(Thread.java:534) Caused by: javax.management.NotCompliantMBeanException: Cannot register MBean: JMImplementation:type=MBeanServerDelegate at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:300) at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:200) ... 8 more Caused by: java.lang.NullPointerException at org.jboss.mx.modelmbean.ModelMBeanInvoker.setModelMBeanInfo(ModelMBeanInvoker.java:170) at org.jboss.mx.modelmbean.XMBean.<init>(XMBean.java:241) at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:180) ... 9 more
Maybe setting that removes the regular JBoss class path. It looks like the MBean Server is not starting which is really the main part of JBoss, so nothing after that can even work.
It is like it no longer has the jars that are in the Where_You_Installed_JBoss\lib are in the classpath.
%JBOSS_INSTALL_DIRECTORY% is just a place holder I made up, there is no such var.
Iam having my own batch file and the contents are as follows
set JB_CLASS=C:\myproject\jboss\classes //this contains all the java classes set JBOSS_CLASSPATH=%JB_CLASS%
.\run.bat
In run.bat i see the following
echo %JBOSS_CLASSPATH% if "%JBOSS_CLASSPATH%" == "" ( set JBOSS_CLASSPATH=%JAVAC_JAR%;%RUNJAR% ) ELSE ( set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVAC_JAR%;%RUNJAR% )
And you effectively overwrite that variable in your batch file when you put
set JBOSS_CLASSPATH=%JB_CLASS%
Try this instead
set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JB_CLASS%
Mark
sowjan kumar
Greenhorn
Joined: Oct 09, 2004
Posts: 23
posted
0
Thanks Mark..But still the same issue. The exception as follows
Failed to boot JBoss: java.lang.RuntimeException: Cannot create MBeanServer at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:224) at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:56) at javax.management.MBeanServerFactory.createMBeanServerImpl(MBeanServerFactory.java:207) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:44) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:369) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315) at org.jboss.Main.boot(Main.java:195) at org.jboss.Main$1.run(Main.java:463) at java.lang.Thread.run(Thread.java:534) Caused by: javax.management.NotCompliantMBeanException: Cannot register MBean: JMImplementation:type=MBeanServerDelegate at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:300) at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:200) ... 8 more Caused by: java.lang.NullPointerException at org.jboss.mx.modelmbean.ModelMBeanInvoker.setModelMBeanInfo(ModelMBeanInvoker.java:170) at org.jboss.mx.modelmbean.XMBean.<init>(XMBean.java:241) at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:180) ... 9 more Press any key to continue . . .
sowjan kumar
Greenhorn
Joined: Oct 09, 2004
Posts: 23
posted
0
Thanks a lot Mark. Solved this issue by cleaning the classes inside JB_CLASS folder. I had some .xml and .properties file inside that and after removign that it worked fine.