3 Replies Latest reply on Feb 14, 2011 5:46 AM by iltrex

    exception  filter not found as a child of web-app in unordered_sequence:

    iltrex

      We installed a new server, with the jboss AS version 6.

       

      The web.xml that has always worked fails, now.

      We get an error that says something about unordered_sequence.

      I cannot find much on google, can you help ?

       

       

      The exception is

       

      11:04:38,255 ERROR [AbstractKernelController] Error installing to Parse: name=vfs:///usr/java/jboss-6.0.0.Final/server/default/deploy/HelpDocumentation.war state=PreParse mode=Manual requiredState=Parse: org

      .jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///usr/java/jboss-6.0.0.Final/server/default/deploy/HelpDocumentation.war

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: vfs:///usr/java/jboss-6.0.0.Final/server/default/deploy/HelpDocumentation.war/WEB-INF/web.xml@5,10

      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: filter not found as a child of web-app in unordered_sequence: error-page* welcome-file-list? servlet-mapping* login-config? mime-mapping* distributable? session-config? security-role* taglib* security-constraint* context-param* servlet* {all descriptionGroup}? {unordered_sequence jndiEnvironmentRefsGroup}?

       

      the web.xml file is very simple

       

      <?xml version="1.0" encoding="UTF-8"?>

      <web-app >

            <filter>

                          <filter-name>ExpiresFilter</filter-name>

                          <filter-class>com.cj.expire.ExpiresFilter</filter-class>

                          <init-param>

                                    <param-name>expires</param-name>

                                    <!-- in seconds -->

                                    <param-value>60</param-value>

                          </init-param>

                </filter>

                <filter-mapping>

                          <filter-name>ExpiresFilter</filter-name>

                          <url-pattern>*.html</url-pattern>

                </filter-mapping>

      </web-app>

        • 1. Re: exception  filter not found as a child of web-app in unordered_sequence:
          jaikiran

          Try adding an xsd declaration in that web.xml as follows:

           

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.5"
                   xmlns="http://java.sun.com/xml/ns/javaee"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
          
          <filter>
                              <filter-name>ExpiresFilter</filter-name>
                              <filter-class>com.cj.expire.ExpiresFilter</filter-class>
                              <init-param>
                                        <param-name>expires</param-name>
                                        <!-- in seconds -->
                                        <param-value>60</param-value>
                              </init-param>
                    </filter>
                    <filter-mapping>
                              <filter-name>ExpiresFilter</filter-name>
                              <url-pattern>*.html</url-pattern>
                    </filter-mapping>
          
          </web-app>
          
          • 2. Re: exception  filter not found as a child of web-app in unordered_sequence:
            iltrex

            good, this worked perfectly for the example web.xml file.

             

             

            Now, I tried it on other applications, and I get a new error. Here exception and web.xml file...

             

            thanks for help.

             

            Deployment "vfs:///usr/java/jboss-6.0.0.Final/server/default/deploy/sa.war" is in error due to the following reason(s): org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'servlet-class'. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":servlet-name}' is expected. @ vfs:///usr/java/jboss-6.0.0.Final/server/default/deploy/sa.war/WEB-INF/web.xml[6,18]

             

            the file is

             

            <?xml version="1.0" encoding="UTF-8"?>

            <web-app version="2.5"

                     xmlns="http://java.sun.com/xml/ns/javaee"

                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

                      <servlet>

                                <servlet-class>com.xxx.DataGridRpcImpl

                                </servlet-class>

                                <servlet-name>DataGridRpc</servlet-name>

                      </servlet>

                      <servlet-mapping>

                                <servlet-name>DataGridRpc</servlet-name>

                                <url-pattern>/Application/DataGridRpc

                                </url-pattern>

                      </servlet-mapping>

            • 3. Re: exception  filter not found as a child of web-app in unordered_sequence:
              iltrex

              it seems that, if I invert servlet-class and servlet-name order, it works.

              but I have tens of servlets and tens of web.xml files, I would like to avoid changing all of them.

               

              Is there any xsd declaration that will make them work in any order ?