4 Replies Latest reply on Feb 23, 2008 2:11 AM by 807567

    Sun One Web Server Start Up Error

    807567
      I have added filters in my application. I get the below error when I try to restart my application from Sun One Web Server,

      info: CORE3282: stdout: PARSE error at line 6 column 10
      info: CORE3282: stdout: org.xml.sax.SAXParseException: Element type "filter" must be declared.
      failure: ContextConfig[] WEB3524: Parse error in application web.xml
      org.xml.sax.SAXParseException: Element type "filter" must be declared.
      at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1016)
      at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1252)
      at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:2721)
      at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:823)
      at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1222)
      at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)
      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:908)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:89)
      at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275)
      at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:312)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1005)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:257)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3702)
      at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
      at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
      at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
      at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)

      failure: ContextConfig[]: WEB3525: Occurred at line 6 column 10
      failure: ContextConfig[]: WEB3541: Marking this application unavailable due to previous error(s)
      failure: WebModule[]: WEB2705: Context startup failed due to previous errors
      failure: WebModule[]: WEB2720: Error initializing naming context for context
      javax.naming.NamingException: WEB3880: Unknown context name : StandardEngine[null].StandardHost[https-sitarmor84].StandardContext[]
      at org.apache.naming.ContextBindings.bindThread(ContextBindings.java:207)
      at org.apache.catalina.core.StandardContext.bindThread(StandardContext.java:4123)
      at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3811)
      at com.iplanet.ias.web.WebModule.stop(WebModule.java:329)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3782)
      at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
      at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
      at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
      at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)


      Please help.
        • 1. Re: Sun One Web Server Start Up Error
          807567
          Hi,

          I think that you may be using the wrong dtd. It sounds like the dtd does not match with the web.xml file.

          Try changing the dtd declaration to the following:

          http://java.sun.com/dtd/web-app_2_3.dtd

          If this does not solve your problem please come back to us...
          • 2. Re: Sun One Web Server Start Up Error
            807567
            hi shylaja i too think the same proble occurs. you mistakenly used web.xml
            • 3. Re: Sun One Web Server Start Up Error
              807567
              Hi,
              I've had the same problem. How exactly do I change the dtd settings and all ?
              I'm working under Eclipse, as a "Dynamic Web Project"

              Thanks,
              dice_team
              • 4. Re: Sun One Web Server Start Up Error
                807567
                Which version of Sun web server are you using? Is it 6.1, 7.0 or 7.0 Update2.
                6.1 supports Servlet 2.3 spec. 7.0 supports Servlet 2.4 spec and 7.0 Update 1 and 2 support Servlet 2.5.

                Servlet 2.3 is DTD based and Servlet 2.4 onwards are schema based.
                The DTD or schema will be right after XML prolog in web.xml.

                You can use one of the following:

                <!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 xmlns="http://java.sun.com/xml/ns/j2ee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

                I am sure your web.xml is not correctly written for the DTD/schema used.
                If you take care of that I am sure th problem will go away.

                If not, let us know if your webapp's WEB-INF/lib has xerces.jar.