Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1_b37
    • Fix Version/s: 3.1.1_b05
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Linux x86_64
      JDK6U23

      Description

      Assume the following classes:

      @RequestScoped
      public class Foo
      {
      }

      @RequestScoped
      public class Bar
      {
      @SuppressWarnings("unused")
      @Inject
      private Foo foo;
      }

      1.) Create an empty web app with beans.xml
      2.) Place the Foo class into a jar file named "alpha.jar", add an empty beans.xml and bundle the jar with the web app
      3.) Place the Bar class into a jar file named "bravo.jar", add an empty beans.xml and bundle the jar with the web app

      During deployment, I get the following exception:

      org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Foo] with qualifiers [@Default] at injection point [[field] @Inject private org.opentck.javaee.cdi.visibility.Bar.foo]

      Note that if I swap the contents of the jar files (rename alpha.jar to bravo.jar and the former bravo.jar to alpha.jar), the application deploys and works as expected. Therefore, it looks like an ordering issue - seems that injection points of beans in the first archive are being validated before bean discovery has been done in the other.

        Activity

        Hide
        alesj added a comment -

        >> Note that the issue only affects GlassFish. On JBoss AS 6 (which bundles Weld 1.1.0.CR3) the tests pass.

        This work in JBoss due to the way we handle BDAs, which is per CL.
        But that results in the following issue: JBAS-8849.

        Show
        alesj added a comment - >> Note that the issue only affects GlassFish. On JBoss AS 6 (which bundles Weld 1.1.0.CR3) the tests pass. This work in JBoss due to the way we handle BDAs, which is per CL. But that results in the following issue: JBAS-8849.
        Show
        mojavelinux added a comment - Here's an updated test case: https://github.com/seam/solder/blob/master/impl/src/test/java/org/jboss/seam/solder/test/compat/visibility/JarToJarReverseAlphaVisibilityTest.java Btw, this issue is resolved by the latest Weld snapshot, available here: https://repository.jboss.org/nexus/content/repositories/snapshots/org/jboss/weld/weld-osgi-bundle/
        Hide
        Nazrul added a comment -
        Show
        Nazrul added a comment - Forum thread where another user may have ran into this: http://www.java.net/forum/topic/glassfish/glassfish/trouble-deploying-war-cdi-enabled-jars-using-glassfish-embedded-31
        Hide
        toomanyryans added a comment -

        That's me on the forum post. Updating to Glassfish Embedded 3.1.1-b04 which uses Weld 1.1.1.Final resolves my issue. Is this the same as http://java.net/jira/browse/GLASSFISH-15721 ?

        Show
        toomanyryans added a comment - That's me on the forum post. Updating to Glassfish Embedded 3.1.1-b04 which uses Weld 1.1.1.Final resolves my issue. Is this the same as http://java.net/jira/browse/GLASSFISH-15721 ?
        Hide
        Sivakumar Thyagarajan added a comment -

        This issue has been fixed since the integration of Weld 1.1.1.Final (that fixes root cause WELD-846) into GlassFish 3.1.1(b4+) and GlassFish trunk.

        Through svn revision 47397, I have also added the following developer tests to cover this scenario
        javaee-integration/cdi-servlet-3.0-annotation-with-web-inf-lib-ordering
        javaee-integration/cdi-servlet-3.0-annotation-with-web-inf-lib-ordering-reversed

        Show
        Sivakumar Thyagarajan added a comment - This issue has been fixed since the integration of Weld 1.1.1.Final (that fixes root cause WELD-846) into GlassFish 3.1.1(b4+) and GlassFish trunk. Through svn revision 47397, I have also added the following developer tests to cover this scenario javaee-integration/cdi-servlet-3.0-annotation-with-web-inf-lib-ordering javaee-integration/cdi-servlet-3.0-annotation-with-web-inf-lib-ordering-reversed

          People

          • Assignee:
            Sivakumar Thyagarajan
            Reporter:
            Jozef Hartinger
          • Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: