9 Replies Latest reply on Feb 14, 2007 3:47 PM by Wessel de Roode

    MDB deployment problem

    Meinert Schwartau Newbie

      Hi!

      I'm getting an error message if I deploy my MDB. I'm have got an error since I declared some activation properties in a deployment descriptor.

      The MDB-Code:

      @MessageDriven(activationConfig =
       {
       @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
       @ActivationConfigProperty(propertyName="destination", propertyValue="topic/myTopic")
       })
      public class MyMDB implements MessageListener
      {
       public void onMessage(javax.jms.Message message) {
       //do something
       }
      }
      
      


      My deployment descriptor:
      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
       http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
       version="3.0">
       <enterprise-beans>
       <message-driven>
       <ejb-name>MyMDB</ejb-name>
       <ejb-class>myPackage.MyMDB</ejb-class>
       <activation-config>
       <activation-config-property>
       <activation-config-property-name>
       user
       </activation-config-property-name>
       <activation-config-property-value>
       my_user
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       password
       </activation-config-property-name>
       <activation-config-property-value>
       my_passwort
       </activation-config-property-value>
       </activation-config-property>
       </activation-config>
       </message-driven>
       </enterprise-beans>
      </ejb-jar>
      


      If I deploy this, I'm getting the following error Message:

      12:08:13,436 WARN [ServiceController] Problem starting service jboss.j2ee:ear=MyEar.ear,jar=MyJar.jar,name=MyMDB,service=EJB3
      org.jboss.deployment.DeploymentException: Unable to create activation spec ra=jboss.jca:service=RARDeployment,name='null' messaging-type=javax.jms.MessageListener properties={password=ActivationConfig
      Property(password=my_password), user=ActivationConfigProperty(user=my_user), destinationType=ActivationConfigProperty(destinationType=javax.jms.Topic)}; - nested throwable: (javax.manageme
      nt.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='null' is not registered.)
      at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:310)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:195)
      at org.jboss.ejb3.mdb.MDB.startProxies(MDB.java:279)
      at org.jboss.ejb3.mdb.MDB.start(MDB.java:218)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      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(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor6.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy50.start(Unknown Source)
      at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
      at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:439)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:486)
      at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      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(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor6.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy34.start(Unknown Source)
      at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy35.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor14.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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='null' is not registered.
      at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:653)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:305)
      ... 100 more


      I'm using JBOSS 4.0.4.GA

      Any suggestions?
      Meinert

        • 1. Re: MDB deployment problem
          Weston M. Price Master

          You will want to specfify the JCA/JMS RAR that allows for inflow based messaging in JBoss. Easiest way to do this is by using the ResourceAdapter annotation

          @ResourceAdapter("jms-ra.rar")

          This can be placed after your @MessageDriven annotation. It is a class level annotation.

          • 2. Re: MDB deployment problem
            Meinert Schwartau Newbie

            Thanks for your answer.

            I have followed your tip and have got a new exception :-(

            The new MDB-Code:

            @MessageDriven(activationConfig =
             {
             @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
             @ActivationConfigProperty(propertyName="destination", propertyValue="topic/myTopic")
             })
            @ResourceAdapter("jms-ra.rar")
            public class MyMDB implements MessageListener
            {
             public void onMessage(javax.jms.Message message) {
             //do something
             }
            }
            


            If I deploy the new stuff, I'm getting the following error Message:


            14:08:39,071 WARN [ServiceController] Problem starting service jboss.j2ee:ear=MyEAR.ear,jar=MyJAR.jar,name=MyMDB,service=EJB3
            org.jboss.deployment.DeploymentException: Unable to create activation spec ra=jboss.jca:service=RARDeployment,name='jms-ra.rar' messaging-type=javax.jms.MessageListener properties={password=Activation
            ConfigProperty(password=my_passwort), user=ActivationConfigProperty(user=my_user), destinationType=ActivationConfigProperty(destinationType=javax.jms.Topic)}; - nested throwable: (java.lan
            g.ClassCastException: java.lang.String)
             at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
             at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:310)
             at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:195)
             at org.jboss.ejb3.mdb.MDB.startProxies(MDB.java:279)
             at org.jboss.ejb3.mdb.MDB.start(MDB.java:218)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
             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(ServiceController.java:978)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:417)
             at sun.reflect.GeneratedMethodAccessor6.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy50.start(Unknown Source)
             at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
             at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:439)
             at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:486)
             at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
             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(ServiceController.java:978)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:417)
             at sun.reflect.GeneratedMethodAccessor6.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy34.start(Unknown Source)
             at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
             at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
             at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
             at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
             at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy35.start(Unknown Source)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
             at sun.reflect.GeneratedMethodAccessor14.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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy6.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
            Caused by: java.lang.ClassCastException: java.lang.String
             at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(ActivationSpecFactory.java:76)
             at org.jboss.resource.deployment.RARDeployment.createActivationSpec(RARDeployment.java:254)
             at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeployment.java:218)
             at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
             at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:305)
             ... 100 more
            


            Any suggestions?
            Meinert


            • 3. Re: MDB deployment problem
              Petr Matejka Newbie

              Hi,
              I'm having similar problem and I'm not sure if it's jboss bug or not. It appears whenever I have MDB with activation config properties defined in annotations and message-driven section for that MDB in ejb-jar.xml.

              My MDB:

              @MessageDriven(activationConfig = {
               @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
               @ActivationConfigProperty(propertyName = "destination", propertyValue = "replication-in" ) })
              @TransactionManagement(TransactionManagementType.BEAN)
              public class zzz implements MessageListener {
               public void onMessage(javax.jms.Message message) {
               }
              }
              


              Part of my ejb-jar.xml:
               ...
              <message-driven>
               <ejb-name>zzz</ejb-name>
               <ejb-class>cz.tipsport.tip.replication.ejb.mgr.in.zzz</ejb-class>
              </message-driven>
               ...
              


              The exception I get:
              2006-07-19 14:27:19,936 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed jboss.j2ee:ear=tip.ear,jar=replication-bl.jar,name=zzz,service=EJB3
              org.jboss.deployment.DeploymentException: Unable to create activation spec ra=jboss.jca:service=RARDeployment,name='null' messaging-type=javax.jms.MessageListener properties={destinationType=ActivationConfigProperty(destinationType=javax.jms.Queue)}; - nested throwable: (javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='null' is not registered.)
               at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
               at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:310)
               at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:195)
               at org.jboss.ejb3.mdb.MDB.startProxies(MDB.java:279)
               at org.jboss.ejb3.mdb.MDB.start(MDB.java:218)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor2.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(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy101.start(Unknown Source)
               at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
               at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:439)
               at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:486)
               at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor2.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(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy29.start(Unknown Source)
               at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
               at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
               at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy30.start(Unknown Source)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
               at sun.reflect.GeneratedMethodAccessor50.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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy8.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor2.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(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy4.start(Unknown Source)
               at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy5.deploy(Unknown Source)
               at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
               at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
               at org.jboss.Main.boot(Main.java:200)
               at org.jboss.Main$1.run(Main.java:464)
               at java.lang.Thread.run(Thread.java:595)
              Caused by: javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='null' is not registered.
               at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:653)
               at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:305)
               ... 146 more
              


              • 4. Re: MDB deployment problem
                Petr Matejka Newbie

                I forgot to mention that if I remove message-driven section from ejb-jar.xml, everything works fine.

                • 5. Re: MDB deployment problem
                  Chirag Patel Newbie

                  I had this same problem. I fixed it by adding the name attribute to the @MessageDriven annotation

                  e.g. @MessageDriven(name="testMDB", activationConfig = {
                  @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                  @ActivationConfigProperty(propertyName = "destination", propertyValue = "replication-in" ) })

                  • 6. Re: MDB deployment problem
                    Chirag Patel Newbie

                    slight problem with my previous post. It didn't quite work as well as I had hoped. It does prevent the exception from occuring, but then it stops picking up my entries from ejb-jar.xml and jboss.xml. If I change the <ejb-name> to match what I put in the annotation, i get the "Unable to create activation spec" error again.

                    Basically, it seems I get this problem anytime I have xml entries in ejb-jar.xml or jboss.xml (or both), and if the <ejb-name> matches what's being deployed. This is problematic because I want to specify the topic name in jboss.xml, but I can't because i can't have a jboss.xml entry with the matching <ejb-name>. This seems like a pretty big problem. Is this a JBoss bug?

                    • 7. Re: MDB deployment problem
                      Chirag Patel Newbie

                      it seems that if you want to use annotations and ejb-jar.xml (e.g. if you want to define your MDB with annotations, but specify the destination in ejb-jar.xml), you must include the <message-destination-type> tag in ejb-jar.xml, otherwise you get the "Unable to create activation spec ...." exception. Don't know why, but it works.

                      • 9. Re: MDB deployment problem
                        Wessel de Roode Newbie

                        Issue is still open.
                        Could somebody close it or fix it :-/ I'm having the same error 2 years later, think it's a human bug, rather write that down in the bug report so others know there messing up the same (or not)

                        Wessel