4 Replies Latest reply on Feb 9, 2009 4:58 PM by hsathappan

    Error deploying EJB3 Message driven bean with upgrade to JBo

    hsathappan

      Hi,

      I get the following error on server startup with JBoss 5 while it works with JBoss 4.2.2.

      10:24:38,457 INFO [JBossASKernel] Created KernelDeployment for: reporting.jar
      10:24:38,457 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=reporting.jar,name=SEMReportDataExtraction,service=EJB3
      10:24:38,457 INFO [JBossASKernel] with dependencies:
      10:24:38,461 INFO [JBossASKernel] and demands:
      10:24:38,465 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
      10:24:38,469 INFO [JBossASKernel] and supplies:
      10:24:38,473 INFO [JBossASKernel] jndi:null
      10:24:38,477 INFO [JBossASKernel] Class:javax.jms.MessageListener
      10:24:38,481 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=reporting.jar,name=SEMReportDataExtraction,service=EJB3) to KernelDeployment of: reporting.jar
      10:24:38,588 INFO [EJBContainer] STARTED EJB: com.coremetrics.reporting.semtree.jms.SEMReportDataExtractionBean ejbName: SEMReportDataExtraction
      10:24:38,761 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@7a12f9e9(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@17d8ace destination=queue/SEMReportData destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      javax.naming.NameNotFoundException: SEMReportData not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at org.jboss.util.naming.Util.lookup(Util.java:222)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:464)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:352)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)

      --

      The startup on JBoss 4.2.2 is successful:

      15:00:56,591 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=reporting.jar,name=SEMReportDataExtraction,service=EJB3 with dependencies:
      15:00:56,702 INFO [EJBContainer] STARTED EJB: com.coremetrics.reporting.semtree.jms.SEMReportDataExtractionBean ejbName: SEMReportDataExtraction
      15:00:56,707 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/SEMReportData
      15:00:56,708 WARN [MessagingContainer] destination not found: queue/SEMReportData reason: javax.naming.NameNotFoundException: SEMReportData not bound
      15:00:56,713 WARN [MessagingContainer] creating a new temporary destination: queue/SEMReportData
      15:00:56,727 INFO [SEMReportData] Bound to JNDI name: queue/SEMReportData

      Any help is greatly appreciated.

      thanks,
      Hari

        • 1. Re: Error deploying EJB3 Message driven bean with upgrade to
          peterj

          JBoss AS 4.2.x contains JBossMQ. In AS 5.0.0, JBossMQ was replaced by JBoss Messaging, which has different configuration files. Apparently, you have not converted your messaging-related configuration files (such as for your own destinations) to JBoss Messaging. Look at the example destinations config file in docs/examples/jms for an example.

          • 2. Re: Error deploying EJB3 Message driven bean with upgrade to
            hsathappan

            Hi Peter,

            thanks for the quick response. We didn't have a separate configuration file in 4.2.2. We just had a message driven annotation which was packaged as a jar and this jar was put in the deploy folder and it automatically worked.

            @MessageDriven(
            activationConfig =
            {
            @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
            @ActivationConfigProperty(propertyName="destination", propertyValue="queue/SEMReportData")
            },
            name="SEMReportDataExtraction", mappedName="queue/SEMReportData",
            description="Extracts and builds a report"
            )

            thanks,
            Hari

            • 3. Re: Error deploying EJB3 Message driven bean with upgrade to
              jaikiran

               

              queue/SEMReportData


              You mean you did not have any configuration files to create this queue which belongs to your application? I think that's what you mean because in your JBoss-4.2.2 logs i see this:

              15:00:56,707 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/SEMReportData
              15:00:56,708 WARN [MessagingContainer] destination not found: queue/SEMReportData reason: javax.naming.NameNotFoundException: SEMReportData not bound
              15:00:56,713 WARN [MessagingContainer] creating a new temporary destination: queue/SEMReportData


              In JBossAS-5, the temporary queues are not created by default. Follow this JIRA for a solution https://jira.jboss.org/jira/browse/JBAS-6013


              • 4. Re: Error deploying EJB3 Message driven bean with upgrade to
                hsathappan

                Thanks jaikiran! that worked.