7 Replies Latest reply on May 24, 2012 11:01 AM by gatlachinna

    EAR file deployment exception under JBOSS AS 7.1.0 beta

    jnjnc

      Hi,

       

      I'm trying to deploy a simple ear-file which contains an ejb.jar which reference some resources : data source and JMS connection factory.

      I add the configuration for them in standalone.xml and it appears they are correctly deployed according admin console and trace :

       

      17:06:01,612 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/jdbc/lockDS]

      17:06:01,612 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/jdbc/mainDS]

       

      I referenced them in ejb-jar.xml and have a jndi binding in jboss.xml

       

      These binding looks like this:

       

          <resource-ref>

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

               <jndi-name>java:/ConnectionFactory</jndi-name>

         </resource-ref> 

         <resource-ref>

               <res-ref-name>jdbc/mainDataSource</res-ref-name>

               <jndi-name>java:jboss/jdbc/mainDS</jndi-name>

         </resource-ref>

         <resource-ref>

               <res-ref-name>jdbc/lockDataSource</res-ref-name>

               <jndi-name>java:jboss/jdbc/lockDS </jndi-name>

         </resource-ref>  

       

       

      Deployment fails because of the following:

       

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.naming.context.java.jboss.resources.jdbc.mainDataSource (missing) dependents: [service jboss.naming.context.java.comp.DummyBench_EAR.DummyBench_EJB.DummyProcessingBean.env.jdbc.mainDataSource]

       

            service jboss.naming.context.java.jboss.resources.jdbc.lockDataSource (missing) dependents: [service jboss.naming.context.java.comp.DummyBench_EAR.DummyBench_EJB.DummyProcessingBean.env.jdbc.lockDataSource]

       

            service jboss.naming.context.java.jboss.resources.jms.JMSQueueConnectionFactory (missing) dependents: [service jboss.naming.context.java.comp.DummyBench_EAR.DummyBench_EJB.DummyProcessingBean.env.jms.JMSQueueConnectionFactory]

       

      Any suggestion would be appreciate.

      Thanks

        • 1. Re: EAR file deployment exception under JBOSS AS 7.1.0 beta
          jnjnc

          It seems jboss.xml configuration file is being replaced by jboss-ejb3.xml.

          I solved data source binding with the following configuration in this file but I'm still unable do bind a jms queue.

          Could you give some advice as I didn't find related xsd schemas.

           

          Thanks


             <ejb-name>DummyProcessingBean</ejb-name>
                  <resource-ref>
                        <res-ref-name>jms/JMSQueueConnectionFactory</res-ref-name>
                        <jndi-name>java:/ConnectionFactory</jndi-name>
                    </resource-ref>
                    <resource-ref>
                        <res-ref-name>jdbc/mainDataSource</res-ref-name>
                        <jndi-name>java:jboss/jdbc/mainDS</jndi-name>
                    </resource-ref>
                    <resource-ref>
                        <res-ref-name>jdbc/lockDataSource</res-ref-name>
                        <jndi-name>java:jboss/jdbc/lockDS </jndi-name>
                    </resource-ref>  
                    <message-destination-ref>
                        <message-destination-ref-name>jms/ReplyQueue</message-destination-ref-name>
                        <jndi-name>queue/dummyReplyQueue</jndi-name>
                      </message-destination-ref>

                .....

          • 2. Re: EAR file deployment exception under JBOSS AS 7.1.0 beta
            kavandesai

            Hi JN,

             

            You probably need to java: prefix in jndi-name element like

            <message-destination-ref>

                          <message-destination-ref-name>jms/ReplyQueue</message-destination-ref-name>

                          <jndi-name>java:/queue/dummyReplyQueue</jndi-name>

                        </message-destination-ref>

            or you directly call by following way from the respective java file

             

            @Resource(mappedName = "java:/queue/dummyReplyQueue")

                private Queue dummyReplyQueue;

             

            No need to declare it in jboss-ejb3.xml and yes jboss.xml is working fine for me.

            • 3. Re: EAR file deployment exception under JBOSS AS 7.1.0 beta
              jnjnc

              Hi Kavan,

               

              Thanks for your reply.

               

              The following code is working fine but I can't use this solution as I need to deploy different configuration for this EJB.

               

               

               

              @Resource

               

               

              (mappedName = "java:/queue/dummyReplyQueue")

               

              public Queue dummyReplyQ;

               

              I mean depending on the queue I'm listening on I will adapt my EJB configuration with env-entry in my ejb-jar.xml

               

              I tried to change the message-destination-ref binding without success.

               

              Do yo already succeed to deploy jms queue with deployment descriptor ?

              • 4. Re: EAR file deployment exception under JBOSS AS 7.1.0 beta
                kavandesai

                Hi JN,

                 

                I have done some thing like this :

                 

                I have servlet which is calling injecting jms queue in following manner

                 

                @Resource(name = "java:/jms/TradeBrokerQueue")

                    private Queue tradeBrokerQueue;

                 

                my jboss-web.xml looks like,

                 

                <message-destination-ref>

                    <message-destination-ref-name>jms/TradeBrokerQueue</message-destination-ref-name>

                    <jndi-name>java:/jms/TradeBrokerQueue</jndi-name>

                </message-destination-ref>

                 

                the similar configuration is there in jboss.xml.

                • 5. Re: EAR file deployment exception under JBOSS AS 7.1.0 beta
                  jnjnc

                  Sorry Kavan, my mistake in my previous post, you are right the following configuration is working fine.

                   

                    <message-destination-ref>
                       <message-destination-ref-name>jms/ReplyQueue
                        </message-destination-ref-name>
                        <jndi-name>java:/queue/dummyReplyQueue</jndi-name>
                     </message-destination-ref>

                   

                  My ear-file is being deployed fine, I need to test it now.

                  Regards and thanks for your help.

                  • 6. Re: EAR file deployment exception under JBOSS AS 7.1.0 beta
                    rouadec

                    regarding the jboss.xml/jboss-ejb3.xml remark it seems on my current setup (jboss 7.1.0.CR1b) the jboss.xml is not read, but the jboss-ejb3.xml is.

                     

                    my application packaging is x.ear/x.jar/META-INF/jboss(-ejb3).xml

                    • 7. Re: EAR file deployment exception under JBOSS AS 7.1.0 beta
                      gatlachinna

                      Hello!

                       

                      I'm new with JBoss (I'm using JBossAS7.1.1), I'm facing the following problem:

                       

                      JBAS014775:    New missing/unsatisfied dependencies:

                            service jboss.naming.context.java.comp.specj."specj.jar".BuyerMDB.env.jms.PurchaseOrderQueue (missing) dependents: [service jboss.naming.context.java.comp.specj."specj.jar".BuyerMDB.env."org.spec.jent.ejb.supplier.mdb.BuyerMDB".purchaseOrderQueue]

                            service jboss.naming.context.java.comp.specj."specj.jar".BuyerMDB.env.jms.PurchaseQueueConnectionFactory (missing) dependents: [service jboss.naming.context.java.comp.specj."specj.jar".BuyerMDB.env."org.spec.jent.ejb.supplier.mdb.BuyerMDB".queueConnFactory]

                       

                      I added in my jboss(-ejb3).xml file the following line:

                       

                      <resource-ref>

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

                           <jndi-name>java:/jms/PurchaseOrderQueue</jndi-name>

                         </resource-ref>

                       

                      And now I obtain just an error for the connectionFactory. I tried with

                       

                      <resource-ref>

                        <res-ref-name>queueConnFactory</res-ref-name>

                        <jndi-name>java:/jms/PurchaseQueueConnectionFactory</jndi-name>

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

                        </resource-ref>

                       

                      But I still have error:

                       

                      JBAS014775: New missing/unsatisfied dependencies:

                        service jboss.naming.context.java.comp.specj."specj.jar".BuyerMDB.env.jms.PurchaseQueueConnectionFactory (missing) dependents: [service jboss.naming.context.java.comp.specj."specj.jar".BuyerMDB.env."org.spec.jent.ejb.supplier.mdb.BuyerMDB".queueConnFactory]

                       

                       

                      Can someone explain me how to solve it?

                      Thank in advance for any help you can provide me.

                       

                      Cheers,

                      Gatla