部署MBean时出错,请大虾帮忙!!!

03-08-05 lunxian
为了测试MBean的编写和部署,编写了如下MBean:

/*MBean接口类,没有任何方法*/

public interface CheckUserServiceMBean {

}

/*Service类,实现MBean接口,未作任何具体问题*/

public class CheckUserService implements CheckUserServiceMBean {

public CheckUserService() {

}

public static void main(String[] args) {

CheckUserService service = new CheckUserService();

System.out.println("just a service test");

}

}

/*在user-service.xml中部署*/

<classpath codebase="lib" archives="*"/>

<mbean code="com.start.user.CheckUserService"

name="user:service=CheckUserService">

</mbean>

但在部署时产生如下异常,高手们帮我看看为什么呀?

13:46:51,703 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/user-service.xml

13:46:51,812 WARN [ServiceConfigurator] Failed to complete install

java.lang.ClassNotFoundException: No ClassLoaders found for: com.start.user.CheckUserService

at org.jboss.mx.loading.LoadMgr.beginLoadTask(LoadMgr.java:161)

at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:175)

at java.lang.ClassLoader.loadClass(ClassLoader.java:255)

at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:822)

at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:294)

at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:321)

at org.jboss.system.ServiceCreator.install(ServiceCreator.java:85)

at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:155)

at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)

at org.jboss.system.ServiceController.install(ServiceController.java:225)

猜你喜欢