3 Replies Latest reply on Jun 9, 2009 4:56 PM by yashendra chandrakar

    Problem deploying SAR bundled in EAR

    yashendra chandrakar Newbie

      Hi,

      I have .sar file which contains META-INF/jboss-service.xml

      in jboss-service.xml I have defined some jms Topics and Queues.

      It is successfully deployed if I deploy this .sar independently and all defined Topics and Queues bind properly in JNDI tree.

      But if I bundle this same .sar in .ear then lookup of defined Topics and Queues fails with NameNotBoundException

      <?xml version="1.0" encoding="UTF-8"?>
      
      <server>
       <mbean code="org.jboss.jms.server.destination.TopicService"
       name="jboss.messaging.destination:service=Topic,name=ObjectUpdates"
       xmbean-dd="xmdesc/Topic-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>
       <mbean code="org.jboss.jms.server.destination.TopicService"
       name="jboss.messaging.destination:service=Topic,name=report"
       xmbean-dd="xmdesc/Topic-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>
       <mbean code="org.jboss.jms.server.destination.QueueService"
       name="jboss.messaging.destination:service=Queue,name=event"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>
      </server>


      Do I suppose to perform some specific configuration if bundling the .sar in ear? I am not able to understand why does it fail if deployed under ear and works perfectly if deployed independently as .sar.

      I would really appreciate if anybody can suggest the soultion.

        • 1. Re: Problem deploying SAR bundled in EAR
          yashendra chandrakar Newbie

          I hope it should work even if I don't configure these topics and queues in

          messaging/destination-service.xml.

          As it is working if deployed as .sar even if I dont configure it in messaging/destination-service.xml. But I need it to be bundled with other application jars/wars in a single application ear in place of deploying my application ear and .sar seperately.

          • 2. Re: Problem deploying SAR bundled in EAR
            yashendra chandrakar Newbie

             

            As it is working if deployed as .sar


            typo. As it is working if deployed as .ear

            • 3. Re: Problem deploying SAR bundled in EAR
              yashendra chandrakar Newbie

              Ok if I add this entry in jboss-app.xml then the lookup first fails and succeds.

              <module>
               <service>XXX.sar</service>
               </module>
              



              Here is TRACE log which shows that it first JNDI lookup fails and then looup succeeds at second attempt

              2009-06-09 16:43:41,146 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-4) Tearing down org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1d6da00(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1ad1d8 destination=queue/event destinationType=javax.jms.Queue selector=Alarm = FALSE tx=true durable=true 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)
              2009-06-09 16:43:41,146 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-4) Removing DLQ org.jboss.resource.adapter.jms.inflow.JmsActivation@94edbb(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1d6da00 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@826935 active=true dlq=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler@469fba transacted=true)
              2009-06-09 16:43:41,146 DEBUG [org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler] (WorkManager(2)-4) Closing the JBossConnection->ConnectionDelegate[10522721, ID=ca-1dgx2rvf-1-8fzv2rvf-1t5itm-vfgs4, SID=0]
              2009-06-09 16:43:42,569 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-2) Destination type defined as javax.jms.Topic
              2009-06-09 16:43:42,569 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-2) Retrieving destination topic/ObjectUpdates of type javax.jms.Topic
              2009-06-09 16:43:56,066 WARN [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-2) Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@644e26(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1ad1d8 destination=topic/ObjectUpdates destinationType=javax.jms.Topic 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: ObjectUpdates 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:726)
               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
               at javax.naming.InitialContext.lookup(InitialContext.java:351)
               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:205)
               at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
               at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
               at java.lang.Thread.run(Thread.java:595)
              2009-06-09 16:43:56,066 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-2) Tearing down org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@644e26(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1ad1d8 destination=topic/ObjectUpdates destinationType=javax.jms.Topic 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)
              2009-06-09 16:43:56,066 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-2) Removing DLQ org.jboss.resource.adapter.jms.inflow.JmsActivation@1c1cca(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@644e26 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@117c097 active=true dlq=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler@f557bf transacted=true)
              2009-06-09 16:43:56,066 DEBUG [org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler] (WorkManager(2)-2) Closing the JBossConnection->ConnectionDelegate[22270100, ID=da-1dgx2rvf-1-8fzv2rvf-1t5itm-vfgs4, SID=0]
              2009-06-09 16:43:56,113 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-4) Tearing down complete org.jboss.resource.adapter.jms.inflow.JmsActivation@94edbb(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1d6da00 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@826935 active=true transacted=true)
              2009-06-09 16:43:56,113 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-2) Tearing down complete org.jboss.resource.adapter.jms.inflow.JmsActivation@1c1cca(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@644e26 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@117c097 active=true transacted=true)
              2009-06-09 16:43:56,113 DEBUG [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-3) Tearing down complete org.jboss.resource.adapter.jms.inflow.JmsActivation@a792d3(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@cd6e02 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@9e929f active=true transacted=true)