glassfish
  1. glassfish
  2. GLASSFISH-16608

com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref jms/myQueue@java

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 3.1_b43
    • Fix Version/s: 4.0_b89_RC5
    • Component/s: jms
    • Labels:
      None
    • Environment:

      JDK1.6.0_25, GF3.1 (build 43), Netbeans 7.0 on Windows XP & 7 (Intel platform)

      Description

      java.lang.NullPointerException resulted when declaring JMS resource name by looking up logical name (@Resource(name = "jms/myQueue" and @Resource(name = "jms/myQueueConnectionFactory") instead of directly referencing its Physical JNDI name (@Resource(mappedName = "jms/myQueue" and @Resource(mappedName = "jms/myQueueConnectionFactory")

      1. JMSEnterpriseProject.rar
        41 kB
        crytal123
      2. JMSEnterpriseProject AC Error.log
        5 kB
        crytal123
      3. JMSEnterpriseProject Server log Error.doc
        32 kB
        crytal123
      4. server.log
        35 kB
        crytal123

        Activity

        crytal123 created issue -
        crytal123 made changes -
        Field Original Value New Value
        Attachment JMSEnterpriseProject Server log Error.doc [ 45799 ]
        Attachment JMSEnterpriseProject.rar [ 45800 ]
        crytal123 made changes -
        Attachment server.log [ 45813 ]
        Ed Bratt made changes -
        Assignee Satish Kumar [ sats ] liang.x.zhao [ liang.x.zhao ]
        Hide
        David Zhao added a comment -

        The logical name should in java:comp, java:module, java:app, java:global namespaces. Please don't use vendor specific physical jndi name here.

        The name of the resource, which is defined by the name element or defaulted, is a name that is local to the application component using the resource. (By default the name will be in the JNDI java:comp/env namespace).

        For example, if name doesn't have namespace,

        @Resource(name="jms/myQueue")

        then it equals to:

        @Resource(name="java:comp/env/jms/myQueue")

        Show
        David Zhao added a comment - The logical name should in java:comp, java:module, java:app, java:global namespaces. Please don't use vendor specific physical jndi name here. The name of the resource, which is defined by the name element or defaulted, is a name that is local to the application component using the resource. (By default the name will be in the JNDI java:comp/env namespace). For example, if name doesn't have namespace, @Resource(name="jms/myQueue") then it equals to: @Resource(name="java:comp/env/jms/myQueue")
        David Zhao made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0_b89_RC5 [ 16422 ]
        Resolution Invalid [ 6 ]

          People

          • Assignee:
            David Zhao
            Reporter:
            crytal123
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: