4 Replies Latest reply on Oct 17, 2007 4:18 PM by peterj

    error in JMS and Message-Driven Beans

    benyw

      i use jboss4.0.4GA and j2ee-1_4-doc-tutorial_2
      i follow the steps to 6.2 .
      when i put the SimpleMessage.ear file in the JBoss deploy directory, it dispaly normally. but when i run ant -f jboss-build.xml run-mdb, the error comes

      20:40:26,166 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean
      INFO: In SimpleMessageBean.SimpleMessageBean()
      20:40:26,166 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean setMessageDri
      venContext
      INFO: In SimpleMessageBean.setMessageDrivenContext()
      20:40:26,176 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean ejbCreate
      INFO: In SimpleMessageBean.ejbCreate()
      15-Oct-2007 20:40:26 SimpleMessageBean
      INFO: In SimpleMessageBean.SimpleMessageBean()
      20:40:26,176 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean setMessageDri
      venContext
      INFO: In SimpleMessageBean.setMessageDrivenContext()
      20:40:26,176 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean ejbCreate
      INFO: In SimpleMessageBean.ejbCreate()
      20:40:26,176 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean onMessage
      INFO: MESSAGE BEAN: Message received: This is message 2
      20:40:26,186 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean onMessage
      INFO: MESSAGE BEAN: Message received: This is message 1
      20:40:26,186 ERROR [STDERR] 15-Oct-2007 20:40:26 SimpleMessageBean onMessage
      INFO: MESSAGE BEAN: Message received: This is message 3
      help , help !!!!thank you!

        • 1. Re: error in JMS and Message-Driven Beans
          peterj

          Looks like whoever coded the MDB decided to write to stderr instead of using the log or writing to stdout. From the text of the output (looks like some initialization followed by three messages being received), there is no problem here; looks like it worked just fine.

          • 2. Re: error in JMS and Message-Driven Beans
            benyw

            thank you,PeterJ!!!!
            maybe because the message queue specified in the deployment doesn?t exit, right?

            then i build the queue. put the code to jbossmq-destinations-service.xml


            server display that



            19:27:52,822 ERROR [MainDeployer] Could not create deployment: file:/D:/EE557Ser
            verSide/ejb3/jboss/server/default/deploy/jms/jbossmq-destinations-service.xml
            org.jboss.deployment.DeploymentException: Trying to install an already registere
            d mbean: jboss.mq.destination:service=Queue,name=MyQueue
            at org.jboss.system.ServiceCreator.install(ServiceCreator.java:103)


            do you know the problem? thank you !!!!

            • 3. Re: error in JMS and Message-Driven Beans
              benyw

              and then i create queue/MyQueue dynamically
              using the JMX Console. YES ,i can go to the new page, but


              19:39:10,607 INFO [testTopic] Bound to JNDI name: topic/testTopic
              19:39:10,627 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
              19:39:10,637 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic

              19:39:10,657 INFO [testQueue] Bound to JNDI name: queue/testQueue
              19:39:10,667 INFO [A] Bound to JNDI name: queue/A
              19:39:10,677 INFO [B] Bound to JNDI name: queue/B
              19:39:10,687 INFO [C] Bound to JNDI name: queue/C
              19:39:10,697 INFO [D] Bound to JNDI name: queue/D
              19:39:10,707 INFO [ex] Bound to JNDI name: queue/ex
              19:40:34,257 WARN [ServiceController] Ignoring request to stop nonexistent serv
              ice: jboss.mq.destination:service=Topic,name=queue/MyQueue
              19:40:34,257 ERROR [[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor thr
              ew exception


              meanwhile i send the email to serverand find 0 in QueueDepth!!!
              so i have no idear!!!
              help!!!

              • 4. Re: error in JMS and Message-Driven Beans
                peterj

                For the first problem, looks like queue MyQueue is defined twice. Hunt for it in the *-service.xml files.

                For the second problem, you need to post more of the tack trace.