Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1876

Field type resolution in @Resource doesn't occur (<env-entry-type> in ejb-jar.xml is required)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.Beta1
    • 7.0.1.Final
    • EE
    • None

    Description

      While using @Resource on a field in EJB and defining it's value in ejb-jar.xml, the field type doesn't seem to be automatically resolved. It must be explicitly defined using <env-entry-type>.

      I attach exemplary application (+ sources) here:
      http://community.jboss.org/servlet/JiveServlet/download/627566-41282/ENVTestAS7.jar

      The deployment will fail if the following line is commented:
      <env-entry-type>java.lang.String</env-entry-type>

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Could not determine type for <env-entry> java:comp/env/myEntry please specify the <env-entry-type>.

      After uncommenting it, the deployment runs fine.

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              PedroKowalski Piotr Nowicki (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: