2 Replies Latest reply on Jun 6, 2004 10:09 AM by starksm64

    WAR and EJB-JAR in same EAR?

    fljmayer

      I have a really strange deployment problem with JBoss 3.2.3:
      I have an EAR that contains a JAR with some EJBs and other classes, and a WAR with JSPs, struts stuff etc. When I copy the EAR into the deploy directory, only the JAR is picked up by the deployer, nothing from the WAR is available. If I then copy the WAR into deploy directory, the JSPs are available. So my JAR and my WAR seem to be okay. I check application.xml multiple times, everything looks fine. I remove the entry for the JAR from application.xml, copy the EAR to the deploy directory and - voila - the WAR deploys just fine (after I removed the WAR file from the deploy directory). So it seems that my application.xml it correct after all.

      But what is the cause of this behavior? Am I doing something wrong or does JBoss really not support both an and a module in the same EAR?

        • 1. Re: WAR and EJB-JAR in same EAR?
          fljmayer

          Hm, something went wrong in the last sentence. I meant the ejb and web modules. Here is an attempt to post my application.xml for clarification:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
          <application>
           <display-name>lifex</display-name>
           <module>
           <web>
           <web-uri>lifex.war</web-uri>
           <context-root>/lifex</context-root>
           </web>
           <ejb>lifex.jar</ejb>
           </module>
          </application>
          


          • 2. Re: WAR and EJB-JAR in same EAR?
            starksm64

            Problem sovled. This is not a valid application.xml and unfortunately we do not validate the application.xml against its dtd because we allow for one without any modules in the case of an ear containing only sars. If you validate the doc against its dts you will get an error like:

            The content of module must match ((connector|ejb|java|web),alt-dd?)