Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8767

Startup fails if a web-fragment.xml references fragment name that's not present

    XMLWordPrintable

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use the absolute-ordering element or metadata-complete attribute in web.xml

      Show
      Use the absolute-ordering element or metadata-complete attribute in web.xml
    • Estimated Difficulty:
      Low

      Description

      Application deployment should not fail if a web-fragment.xml references another fragment by name that isn't part of the deployment. That defeats the whole purpose of the relative ordering in the web-fragment.xml.

      For example, Seam Servlet needs to be ordered after Weld Servlet. So we define ordering the Seam Servlet web-fragment.xml as follows:

      <ordering>
      <after>
      <name>WeldServlet</name>
      </after>
      <before>
      <others/>
      </before>
      </ordering>

      However, we can't guarantee that Weld Servlet will be used. In that case, JBoss AS should just ignore the request.

      Here's the error that's appearing in the log:

      org.jboss.deployers.spi.DeploymentException: Invalid ordering

      Caused by: java.lang.IllegalStateException: Unknown name declared in JAR: seam-servlet-3.0.0-20101222.050701-2.jar
      at org.jboss.web.deployers.MergedJBossWebMetaDataDeployer.resolveOrder(MergedJBossWebMetaDataDeployer.java:711) [:6.0.0-SNAPSHOT]
      at org.jboss.web.deployers.MergedJBossWebMetaDataDeployer.deploy(MergedJBossWebMetaDataDeployer.java:306) [:6.0.0-SNAPSHOT]

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rmaucher Remy Maucherat
                  Reporter:
                  dan.j.allen Dan Allen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: