3 Replies Latest reply on Sep 11, 2008 4:54 AM by fmarchioni fmarchioni

    Unable to deploy simple MDB

    fmarchioni fmarchioni Newbie

      Dear all,
      I'm trying to deploy a simple MDB on JBoss 4.2.0 GA. However once I package the mdb in a jar file and deploy it I get this error:

      14:44:33,828 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=DummyMDBean.jar
      java.lang.ClassNotFoundException: No ClassLoaders found for: com.sample.DummyMDBean
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:514)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.jboss.ejb3.Ejb3AnnotationHandler.populateBaseInfo(Ejb3AnnotationHandler.java:293)
       at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:138)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:468)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:424)
       at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:405)
       at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:366)
       at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:321)
       at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:77)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
       at $Proxy0.create(Unknown Source)


      This is the source code:

      package com.sample;
      
      import javax.ejb.ActivationConfigProperty;
      import javax.ejb.MessageDriven;
      import javax.jms.Message;
      import javax.jms.MessageListener;
      
       @MessageDriven(
       name="MessageMDBSample",
       activationConfig = {
       @ActivationConfigProperty(
       propertyName = "destinationType",
       propertyValue = "javax.jms.Queue"),
       @ActivationConfigProperty(propertyName = "destination",
       propertyValue = "testQueue"),
       @ActivationConfigProperty(
       propertyName = "acknowledgeMode",
       propertyValue = "Auto-acknowledge")})
      
       public class DummyMDBean implements MessageListener {
      
       public void onMessage(Message message) {
      
       System.out.println("Message received "+message.toString());
      
       }
      
      
      
       }


      The queue was deployed separately under the "deploy" directory

      <server>
       <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=testQueue">
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       </mbean>
      </server>


      Any help ?
      thanks a lot
      frank