5 Replies Latest reply on Dec 4, 2014 8:33 AM by jaysensharma

    Issue with resolving message-destination-ref in JBoss AS 7.1.1

    valsaraj007

      Hi,

       

      I am getting followng warning in log when I deploy ear in JBoss AS 7.1.1.

      WARN  [org.jboss.as.ee] (MSC service thread 1-7) JBAS011001: Could not resolve message-destination-ref java:comp/env/queue/invitation

       

      It was working fine with older version. Is there any change in lookup name?

        • 1. Re: Issue with resolving message-destination-ref in JBoss AS 7.1.1
          jaysensharma

          What is your JMS queue's actual JNDI name?

          How you have defined the <message-destination-ref> in your ejb-jar.xml ?

          please share your messaging configuration where we can see your JMS queue configuration and the  ejb-jar.xml  for <message-destination-ref>

          • 2. Re: Issue with resolving message-destination-ref in JBoss AS 7.1.1
            valsaraj007

            Hi Jay,

             

            Here is the configuration details:

             

            In standalone.xml:

              <jms-queue name="invitation">

              <entry name="queue/invitation"/>

              <entry name="java:jboss/exported/jms/queue/invitation"/>

              </jms-queue>

             

            In ejb-jar.xml:

              <session>

              <ejb-name>InvitationBean</ejb-name>

              <ejb-class>org.app.core.bean.InvitationBean</ejb-class>

              <resource-ref>

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

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

              </resource-ref>

              <message-destination-ref>

              <message-destination-ref-name>queue/invitation</message-destination-ref-name>

              <message-destination-type>javax.jms.Queue</message-destination-type>

              </message-destination-ref>

              </session>

            • 3. Re: Re: Issue with resolving message-destination-ref in JBoss AS 7.1.1
              jaysensharma

              Do you have "jboss-ejb3.xml" (old jboss.xml file is replaced by this jboss-ejb3.xml) in the same directory as the "ejb-jar.xml" ?

              Can you try the <message-destination-link> to define your <message-destination-ref>

               

              <?xml version="1.1" encoding="UTF-8"?>
              <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
                      version="3.1">
                  <enterprise-beans>
                      <session>
                          <ejb-name>InvitationBean</ejb-name>
                          <ejb-class>org.app.core.bean.InvitationBean</ejb-class>
                          <message-destination-ref>
                              <message-destination-ref-name>queue/invitation</message-destination-ref-name>
                              <message-destination-link>someLinkOfDestination</message-destination-link>
                          </message-destination-ref>
                      </session>
                  </enterprise-beans>
              
                  <assembly-descriptor>
                      <message-destination>
                          <message-destination-name>someLinkOfDestination</message-destination-name>
                          <lookup-name>java:jboss/exported/jms/queue/invitation</lookup-name>
                      </message-destination>
                  </assembly-descriptor>
              </ejb-jar>
              
              • 4. Re: Issue with resolving message-destination-ref in JBoss AS 7.1.1
                valsaraj007

                Hi Jay,

                I am still using old jboss.xml file and there is no jboss-ejb3.xml file. Is this need just rename old file?

                • 5. Re: Issue with resolving message-destination-ref in JBoss AS 7.1.1
                  jaysensharma

                  Yes,  jboss.xml file will no longer be processed, Hence if you want to define any container specific settings to your beans then you should use jboss-ejb3.xml, refer to [1] for more details, jboss-ejb3.xml is a custom deployment descriptor that can be used in either EJB JAR or WAR archives. In an EJB JAR archive it must be located in the META-INF/ directory. In a WAR archive it must be located in the WEB-INF/ directory. The format is similar to ejb-jar.xml, using some of the same namespaces and providing some other additional namespaces. The contents of jboss-ejb3.xml are merged with the contents of ejb-jar.xml, with the jboss-ejb3.xml items taking precedence

                   

                   

                  [1] jboss-ejb3.xml Reference - JBoss AS 7.1 - Project Documentation Editor

                  1 of 1 people found this helpful