Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: cdi
    • Labels:
      None
    • Status Whiteboard:
      Hide

      weld-int-required

      Show
      weld-int-required

      Description

      See: http://java.net/jira/browse/GLASSFISH-13182

      The application has beans.xml here:
      WEB-INF/classes/META-INF/beans.xml

      However, the GlassFish Weld Integration module expects beans.xml to be under WEB-INF:
      WEB-NF/beans.xml

      I haven't checked the Weld specification in a while, so if WEB-INF/classes/META-INF/beans.xml is a valid location,
      then the GlassFish Weld Integration module will have to be modified to accommodate this location.
      The workaround for now would be to just put beans.xml under WEB-INF directly:
      WEB-NF/beans.xml
      [ Show » ]
      rogerk added a comment - 06/Dec/10 11:49 AM Ok - the problem is as follows... The application has beans.xml here: WEB-INF/classes/META-INF/beans.xml However, the GlassFish Weld Integration module expects beans.xml to be under WEB-INF: WEB-NF/beans.xml I haven't checked the Weld specification in a while, so if WEB-INF/classes/META-INF/beans.xml is a valid location, then the GlassFish Weld Integration module will have to be modified to accommodate this location. The workaround for now would be to just put beans.xml under WEB-INF directly: WEB-NF/beans.xml

        Activity

        Hide
        Sivakumar Thyagarajan added a comment -

        As per Section 12.1 of CDI 1.0 specification:
        > • The WEB-INF/classes directory of a war is a bean archive if there is a file named beans.xml in the WEB-INF directory of the war.
        > • A directory in the JVM classpath is a bean archive if it has a file named beans.xml in the META-INF directory.

        So, the usage of WEB-INF/classes/META-INF/beans.xml doesn't sound right. Making this fix, solves the issue
        move the file (in weld-core): from
        examples/jsf/permalink/src/main/resources/META-INF/beans.xml
        to
        examples/jsf/permalink/src/main/webapp/WEB-INF/beans.xml

        I am clarifying if this scenario is valid and will close the bug after I undestand if this is a portable usage scenario.

        Show
        Sivakumar Thyagarajan added a comment - As per Section 12.1 of CDI 1.0 specification: > • The WEB-INF/classes directory of a war is a bean archive if there is a file named beans.xml in the WEB-INF directory of the war. > • A directory in the JVM classpath is a bean archive if it has a file named beans.xml in the META-INF directory. So, the usage of WEB-INF/classes/META-INF/beans.xml doesn't sound right. Making this fix, solves the issue move the file (in weld-core): from examples/jsf/permalink/src/main/resources/META-INF/beans.xml to examples/jsf/permalink/src/main/webapp/WEB-INF/beans.xml I am clarifying if this scenario is valid and will close the bug after I undestand if this is a portable usage scenario.
        Hide
        Sivakumar Thyagarajan added a comment -

        As per Section 12.1 of CDI 1.0 specification:
        > • The WEB-INF/classes directory of a war is a bean archive if there is a file named beans.xml in the WEB-INF directory of the war.
        > • A directory in the JVM classpath is a bean archive if it has a file named beans.xml in the META-INF directory.

        So, this is an non-portable usage scenario. I have raised https://jira.jboss.org/browse/WELD-780 to get this fixed in Weld jsf/permalink examples. I have also raised a RFE in GlassFish to support this scenario http://java.net/jira/browse/GLASSFISH-15018

        Show
        Sivakumar Thyagarajan added a comment - As per Section 12.1 of CDI 1.0 specification: > • The WEB-INF/classes directory of a war is a bean archive if there is a file named beans.xml in the WEB-INF directory of the war. > • A directory in the JVM classpath is a bean archive if it has a file named beans.xml in the META-INF directory. So, this is an non-portable usage scenario. I have raised https://jira.jboss.org/browse/WELD-780 to get this fixed in Weld jsf/permalink examples. I have also raised a RFE in GlassFish to support this scenario http://java.net/jira/browse/GLASSFISH-15018
        Hide
        Sivakumar Thyagarajan added a comment -

        Marking this as Weld-int-required as we have raised https://jira.jboss.org/browse/WELD-780 to get this fixed in Weld jsf/permalink examples.

        Show
        Sivakumar Thyagarajan added a comment - Marking this as Weld-int-required as we have raised https://jira.jboss.org/browse/WELD-780 to get this fixed in Weld jsf/permalink examples.
        Hide
        Sivakumar Thyagarajan added a comment -

        Marking this issue as minor as the fix is needed in a weld sample and it is easy to make this change by the developer.

        Show
        Sivakumar Thyagarajan added a comment - Marking this issue as minor as the fix is needed in a weld sample and it is easy to make this change by the developer.
        Hide
        mojavelinux added a comment -

        I have submitted a patch to the Weld issue.

        Your understanding of the location for beans.xml is correct. The example was in error.

        Despite the correction, its still necessary to put a second beans.xml on the classpath (src/main/resources/META-INF) when deploying with the embedded Jetty Maven plugin because of how it arranges the deployment.

        Show
        mojavelinux added a comment - I have submitted a patch to the Weld issue. Your understanding of the location for beans.xml is correct. The example was in error. Despite the correction, its still necessary to put a second beans.xml on the classpath (src/main/resources/META-INF) when deploying with the embedded Jetty Maven plugin because of how it arranges the deployment.
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
        Hide
        Sivakumar Thyagarajan added a comment -

        Transferring to JJ Snyder

        Show
        Sivakumar Thyagarajan added a comment - Transferring to JJ Snyder
        Hide
        tlcksnyder added a comment -

        Issue fixed as of weld-1.1.10.Final. Successfully tested with 1.1.10 final in GF 3.1.2, and Weld 2.0.0Beta6 in GF 4.

        Show
        tlcksnyder added a comment - Issue fixed as of weld-1.1.10.Final. Successfully tested with 1.1.10 final in GF 3.1.2, and Weld 2.0.0Beta6 in GF 4.

          People

          • Assignee:
            jjsnyder83
            Reporter:
            rogerk
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: