Geronimo
  1. Geronimo
  2. GERONIMO-6492

Duplicate war message if EAR with two wars both contain beans.xml

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.1
    • Fix Version/s: None
    • Component/s: deployment
    • Security Level: public (Regular issues)
    • Labels:
      None

      Description

      Using a trivial EAR with two web modules inside it, both being nearly empty except for a single .jsp page and an empty beans.xml in WEB-INF causes a message about a duplicate war to be logged:

      2013-10-02 11:30:21,499 WARN  [AdminObjectRefBuilder] Failed to build reference to resource env reference [java:comp/BeanManager] defined in plan file. The corresponding entry in Geronimo deployment descriptor is missing.
      2013-10-02 11:30:21,551 WARN  [EjbModuleBuilder] Duplicated moduleName: 'omtest2' is found ! deployer will rename it to: 'omtest2_duplicated' , please check your modules in application to make sure they don't share the same name
      2013-10-02 11:30:21,552 WARN  [AdminObjectRefBuilder] Failed to build reference to resource env reference [java:comp/BeanManager] defined in plan file. The corresponding entry in Geronimo deployment descriptor is missing.
      

      The EAR is structured as follows:

      omtest.ear
          omtest1.war
              WEB-INF
                  beans.xml
              index.jsp
          omtest2.war
              WEB-INF
                  beans.xml
              index.jsp
      

      Optionally adding deployment descriptors application.xml and geronimo-application.xml to list the modules and set the context root of each war does not solve the problem.

      The message disappears as soon as beans.xml in the second war is removed. At first sight the code seems to be deployed fine, as the index.jsp files in both wars are accessible via their respective URLs.

      Yet, this may be indicative of a deeper problem with CDI in a multi-war EAR application.

        Activity

        Hide
        Arjan Tijms added a comment -

        Unfortunately, it seems to have an effect after all.

        @Named beans from war1 are available in war2 using their EL name (this should not be of course!), and @Named beans from war2 are unavailable in war2.

        Meaning, that e.g. EL expressions using @Named beans (or using their default name) don't work in war2. However, CDI itself is definitely available in war2 as direct injection of CDI managed beans that only exist in war2 does work.

        Show
        Arjan Tijms added a comment - Unfortunately, it seems to have an effect after all. @Named beans from war1 are available in war2 using their EL name (this should not be of course!), and @Named beans from war2 are unavailable in war2. Meaning, that e.g. EL expressions using @Named beans (or using their default name) don't work in war2. However, CDI itself is definitely available in war2 as direct injection of CDI managed beans that only exist in war2 does work.

          People

          • Assignee:
            Unassigned
            Reporter:
            Arjan Tijms
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development