1 Reply Latest reply on Aug 21, 2012 3:20 PM by lafr

    i recently changed to jboss 6.1.0 version from jboss 4.2.2..but it is giving the following exception

    raghu88

      I am getting the following error ....pls help me... 

       

       

      Deployment "vfs:///D:/server/jboss-6.1.0.Final/server/default/deploy/MozartCCNewUI.war" is in error due to the following reason(s): org.xml.sax.SAXException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". @ vfs:///D:/server/jboss-6.1.0.Final/server/default/deploy/MozartCCNewUI.war/WEB-INF/web.xml[152,11]

       

      following is my web.xml file content....

       

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

      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

       

       

      <web-app>

       

       

                <!--

                          To use non XDoclet filters, create a filters.xml file that

                          contains the additional filters (eg Sitemesh) and place it in your

                          project's merge dir.  Don't include filter-mappings in this file,

                          include them in a file called filter-mappings.xml and put that in

                          the same directory.

                -->

       

       

                <distributable />

       

       

                <filter>

                          <filter-name>LoginFilter</filter-name>

                          <filter-class>

                                    com.zyom.security.LoginMonitorFilter

                          </filter-class>

                </filter>

       

       

                <filter-mapping>

                          <filter-name>LoginFilter</filter-name>

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

                </filter-mapping>

                <filter-mapping>

                          <filter-name>LoginFilter</filter-name>

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

                </filter-mapping>

       

       

                <!--

                          To use non XDoclet filter-mappings, create a filter-mappings.xml file that

                          contains the additional filter-mappings and place it in your

                          project's merge dir.

                -->

       

       

                <!--

                          To use non XDoclet listeners, create a listeners.xml file that

                          contains the additional listeners and place it in your

                          project's merge dir.

                -->

       

       

                <servlet>

                          <servlet-name>action</servlet-name>

                          <servlet-class>

                                    org.apache.struts.action.ActionServlet

                          </servlet-class>

                          <init-param>

                                    <param-name>config</param-name>

                                    <param-value>/WEB-INF/struts-config.xml</param-value>

                          </init-param>

                          <init-param>

                                    <param-name>debug</param-name>

                                    <param-value>2</param-value>

                          </init-param>

                          <init-param>

                                    <param-name>detail</param-name>

                                    <param-value>2</param-value>

                          </init-param>

                          <load-on-startup>2</load-on-startup>

                </servlet>

       

       

                <servlet-mapping>

                          <servlet-name>action</servlet-name>

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

                </servlet-mapping>

       

       

                <servlet>

                          <servlet-name>CewolfServlet</servlet-name>

                          <servlet-class>de.laures.cewolf.CewolfRenderer</servlet-class>

                          <load-on-startup>1</load-on-startup>

                </servlet>

       

       

                <servlet-mapping>

                          <servlet-name>CewolfServlet</servlet-name>

                          <url-pattern>/cewolf/*</url-pattern>

                </servlet-mapping>

       

       

                <session-config>

                          <session-timeout>30</session-timeout>

                </session-config>

       

       

                <listener>

          <listener-class>com.zyom.reuse.util.SessionListener</listener-class>

      </listener>

       

                <!--

                          To specify mime mappings, create a file named mime-mappings.xml, put it in your project's mergedir.

                          Organize mime-mappings.xml following this DTD slice:

       

                          <!ELEMENT mime-mapping (extension, mime-type)>

                -->

       

       

                <!-- The Welcome File List -->

                <welcome-file-list>

                          <welcome-file>/pages/MozartCostLoginAdmin.jsp</welcome-file>

                </welcome-file-list>

       

       

                <!--

                          To specify error pages, create a file named error-pages.xml, put it in your project's mergedir.

                          Organize error-pages.xml following this DTD slice:

       

                          <!ELEMENT error-page ((error-code | exception-type), location)>

                -->

       

       

                <taglib>

                          <taglib-uri>/tags/struts-bean</taglib-uri>

                          <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>

                </taglib>

                <taglib>

                          <taglib-uri>/tags/struts-html</taglib-uri>

                          <taglib-location>/WEB-INF/struts-html.tld</taglib-location>

                </taglib>

                <taglib>

                          <taglib-uri>/tags/struts-logic</taglib-uri>

                          <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>

                </taglib>

                <taglib>

                          <taglib-uri>/tags/struts-nested</taglib-uri>

                          <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>

                </taglib>

                <taglib>

                          <taglib-uri>/tags/struts-tiles</taglib-uri>

                          <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>

                </taglib>

                <taglib>

                          <taglib-uri>/tags/pagetaglib</taglib-uri>

                          <taglib-location>/WEB-INF/pagetaglib.tld</taglib-location>

                </taglib>

       

       

                <!--

                          To set up security settings for your web app, create a file named web-security.xml, put it in your project's mergedir.

                          Organize web-security.xml following this DTD slice:

       

                          <!ELEMENT security-constraint (display-name?, web-resource-collection+, auth-constraint?, user-data-constraint?)>

                          <!ELEMENT web-resource-collection (web-resource-name, description?, url-pattern*, http-method*)>

                          <!ELEMENT web-resource-name (#PCDATA)>

                          <!ELEMENT url-pattern (#PCDATA)>

                          <!ELEMENT http-method (#PCDATA)>

                          <!ELEMENT user-data-constraint (description?, transport-guarantee)>

                          <!ELEMENT transport-guarantee (#PCDATA)>

       

                          <!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>

                          <!ELEMENT auth-method (#PCDATA)>

                          <!ELEMENT realm-name (#PCDATA)>

                          <!ELEMENT form-login-config (form-login-page, form-error-page)>

                          <!ELEMENT form-login-page (#PCDATA)>

                          <!ELEMENT form-error-page (#PCDATA)>

                -->

       

       

      </web-app>

        • 1. Re: i recently changed to jboss 6.1.0 version from jboss 4.2.2..but it is giving the following exception
          lafr

          Use your favorite XML-editor which is able to check against xsd.

          Or simply check your xml against "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)"

           

          Especially have a look at "filter*,filter-mapping*,listener*,servlet*,servlet-mapping*"!