0 Replies Latest reply on Jan 5, 2010 4:00 PM by Luis Esquivel

    Message-Driven EJB Help Needed.

    Luis Esquivel Newbie

      Hello,

       

      I am trying to deploy a message-driven EJB.  I am using JBoss version "jboss-5.1.0.GA-jdk6".

       

      When trying to deploy, I am getting 2 separate errors:

       

      1) The first:

        Deployment "vfsfile:/C:/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/www/deploy/d

      estinations-service.xml" is in error due to the following reason(s): java.lang.I

      llegalArgumentException: null object name

       

      09:48:28,195 ERROR [AbstractKernelController] Error installing to Real: name=vfs

      file:/C:/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/www/deploy/destinations-servi

      ce.xml state=PreReal mode=Manual requiredState=Real

      org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.mq.destinati

      on:service=Queue,name=CacheBean

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentExcept

      ion(DeploymentException.java:49)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.jav

      a:118)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.jav

      a:46)

              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.i

      nternalDeploy(AbstractSimpleRealDeployer.java:62)

              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(

      AbstractRealDeployer.java:50)

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(Deployer

      Wrapper.java:171)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(Deployer

      sImpl.java:1439)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi

      rst(DeployersImpl.java:1157)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi

      rst(DeployersImpl.java:1178)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(Deployers

      Impl.java:1098)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra

      ctControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractContr

      oller.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra

      ctController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr

      actController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr

      actController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractContro

      ller.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractContro

      ller.java:553)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(Deployers

      Impl.java:781)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeploye

      rImpl.java:702)

              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter

      .process(MainDeployerAdapter.java:117)

              at org.jboss.system.server.profileservice.repository.ProfileDeployAction

      .install(ProfileDeployAction.java:70)

              at org.jboss.system.server.profileservice.repository.AbstractProfileActi

      on.install(AbstractProfileAction.java:53)

              at org.jboss.system.server.profileservice.repository.AbstractProfileServ

      ice.install(AbstractProfileService.java:361)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra

      ctControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractContr

      oller.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra

      ctController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr

      actController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr

      actController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractContro

      ller.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractContro

      ller.java:553)

              at org.jboss.system.server.profileservice.repository.AbstractProfileServ

      ice.activateProfile(AbstractProfileService.java:306)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(

      ProfileServiceBootstrap.java:271)

              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:

      461)

              at org.jboss.Main.boot(Main.java:221)

              at org.jboss.Main$1.run(Main.java:556)

              at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.IllegalArgumentException: null object name

       

      This Error comes from the destinations-service.xml which looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>

       

       

      <server>

       

        <mbean code="org.jboss.mq.server.jmx.Queue"

              name="jboss.mq.destination:service=Queue,name=CacheBean">

        </mbean>

       

      </server>

       

       

      2) My Second Error comes from the deployment of the EJB:

       

        Deployment "jboss.j2ee:binding=message-driven-bean,jndiName=local/CacheBean@19

      766665,plugin=invoker,service=EJB" is in error due to the following reason(s): o

      rg.jboss.deployers.spi.DeploymentException: Required config property RequiredCon

      figPropertyMetaData@1b5e82f[name=destination descriptions=[DescriptionMetaData@1

      2c7bf6[language=en]]] for messagingType 'javax.jms.MessageListener' not found in

      activation config [ActivationConfigProperty(providerAdapterJNDI=DefaultJMSProvi

      der), ActivationConfigProperty(destinationType=javax.jms.Topic), ActivationConfi

      gProperty(DLQJNDIName=queue/DLQ), ActivationConfigProperty(minSession=1), Activa

      tionConfigProperty(subscriptionDurability=NonDurable), ActivationConfigProperty(

      acknowledgeMode=AUTO_ACKNOWLEDGE), ActivationConfigProperty(maxSession=15), Acti

      vationConfigProperty(keepAlive=30000), ActivationConfigProperty(maxMessages=1),

      ActivationConfigProperty(useDLQ=true), ActivationConfigProperty(DLQMaxResent=10)

      ] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'

       

       

      I have declared the EJB in both the ejb-jar.xml and jboss.xml.

       

      my ejb-jar.xml fragment:

          <message-driven id="CacheBean">

            <description>Cache Bean Description</description>

            <display-name>CacheBean</display-name>

            <ejb-name>CacheBean</ejb-name>

            <ejb-class>mycompany.CacheBean</ejb-class>

            <transaction-type>Container</transaction-type>

            <message-driven-destination>

              <destination-type>javax.jms.Topic</destination-type>

              <subscription-durability>NonDurable</subscription-durability>

            </message-driven-destination>

            <resource-ref>

              <description>ctcf</description>

              <res-ref-name>jms/CTCF</res-ref-name>

              <res-type>javax.jms.TopicConnectionFactory</res-type>

              <res-auth>Application</res-auth>

              <res-sharing-scope>Shareable</res-sharing-scope>

            </resource-ref>

            <resource-ref>

              <description>mdbqcf</description>

              <res-ref-name>jms/MDBQCF</res-ref-name>

              <res-type>javax.jms.QueueConnectionFactory</res-type>

              <res-auth>Application</res-auth>

              <res-sharing-scope>Unshareable</res-sharing-scope>

            </resource-ref>

            <resource-env-ref>

              <description>mdbqueue</description>

              <resource-env-ref-name>mdbqueue</resource-env-ref-name>

              <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>

            </resource-env-ref>

          </message-driven>

       

      My jboss.xml fragment:

          <message-driven>

            <ejb-name>CacheBean</ejb-name>

            <destination-jndi-name>ejb/CacheBean</destination-jndi-name>

            <instance-pool>

              <maximum-size>10</maximum-size>

              <minimum-size>1</minimum-size>

            </instance-pool>

            <server-session-pool>

              <maximum-size>10</maximum-size>

              <max-lap-size>10</max-lap-size>

              <minimum-size>1</minimum-size>

            </server-session-pool>

            <resource-env-ref>

              <resource-env-ref-name>mdbqueue</resource-env-ref-name>

              <jndi-name>jms/topic/CacheTopic</jndi-name>

            </resource-env-ref>

            <resource-ref>

              <res-ref-name>jms/CTCF</res-ref-name>

              <jndi-name>jms/jndi-CacheTopicConnectionFactory</jndi-name>

              <user>jmsuser</user>

              <password>cloudy</password>

            </resource-ref>

            <resource-ref>

              <res-ref-name>jms/MDBQCF</res-ref-name>

              <jndi-name>jms/jndi-MDBQueueConnectionFactory</jndi-name>

              <user>jmsuser</user>

              <password>cloudy</password>

            </resource-ref>

            <message-driven-subscription>

              <client-id>MDBSubscriber</client-id>

            </message-driven-subscription>

          </message-driven>

       

      I probably have a totally obvious error here but I am missing it!!

       

      Any help would be greatly appreciated.

       

      Thanks in advance!