tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "G. Wade Johnson" <wade.john...@abbnm.com>
Subject Re: the dreaded org.xml.sax.SAXParseException error...arrgghh!!!
Date Wed, 09 Apr 2003 13:22:11 GMT
In other XML applications when I've had a validation error on code that
I could see was obviously right, it turned out that I was looking at a
different file than the program was.

So, at the risk of sounding obnoxious are you sure you're looking at
the right file?

The other thing that has bitten me is an invalid character in my
content.

Just a thought,
G. Wade

JS wrote:
> 
> Hi Bill, I posted the web.xml file on my original message. It further below.
> 
> Thanks for your time.
> JS
> 
> > It should be easy enough.  The error is saying that somewhere around
> > line 18 you have something other than:
> >  <servlet>
> >     <!-- possible servlet-icon -->
> >     <servlet-name>MyServlet</servlet-name>
> >     <!-- possible servlet-description -->
> >     <servlet-class>com.myfirm.mypackage.MyServlet</servlet-class> <!--
> >     as many init-params as you need -->
> >     <!-- possible load-on-startup -->
> >     <!-- possible run-as (mostly for J2EE-embeddings) -->
> >     <!-- possible security-role-ref -->
> >  </servlet>
> >
> > If this doesn't help, you could always try and post your "web.xml"
> > file.
> >
> > "JS" <smartt@dcs.kcl.ac.uk> wrote in message
> > news:57708.137.73.8.3.1049850100.squirrel@webmail.dcs.kcl.ac.uk...
> >> This one has been killing my day.
> >> I've checked the archives and other forums for some insight but no
> >> luck. From what I know and can see below, my web.xml file follows the
> >> required DTD structure. Yet I continue to get the dreaded
> >> org.xml.sax.SAXParseException error...as below.
> >> I dont know what I'm missing. Right now my eyes are so tired, it could
> >> be staring me in the face. Hopefully, some fresh eyes will help.
> >> Many thanks
> >> JS
> >>
> >>
> >> -----------------------
> >> Output from catalina.out
> >> ------------------------
> >> [ERROR] Digester - -Parse Error at line 18 column 12: The content of
> >> element type "servlet" must match
> >>
> > "(icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file),ini>
t-param*,load-on-startup?,run-as?,security-role-ref*)".
> >> <org.xml.sax.SAXParseException: The content of element type "servlet"
> >> must match
> >>
> > "(icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file),ini>
t-param*,load-on-startup?,run-as?,security-role-ref*)".>org.xml.sax.SAXParse> Exception:
The content of element type "web-app" must
> >> match
> >>
> > "(icon?,display-name?,description?,distributable?,context-param*,filter*,fil>
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin> g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se>
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca> l-ref*)".
> >>
> >> ----------------------
> >> Snippet from jwsdp.log
> >> ----------------------
> >> 2003-04-09 01:47:27 Exception initializing TldLocationsCache: XML
> >> parsing error on file /WEB-INF/web.xml: (line 18, col 12): The content
> >> of element type "servlet" must match
> >>
> > "(icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file),ini>
t-param*,load-on-startup?,run-as?,security-role-ref*)".2003-04-09
> > 01:47:27 HostConfig[localhost]: Deploying web application
> >> directory mydcs2003-04-09 01:47:27 StandardHost[localhost]: Installing
> >> web
> > application at
> >> context path /mydcs from URL
> > file:C:\WINDOWS\jwsdp-1_0_01\webapps\mydcs2003-04-09 01:47:27
> > WebappLoader[/mydcs]: Deploying class repositories to
> >> work directory C:\WINDOWS\jwsdp-1_0_01\work\Standard
> >> Engine\localhost\mydcs2003-04-09 01:47:27 WebappLoader[/mydcs]: Deploy
> > class files
> >> /WEB-INF/classes to
> > C:\WINDOWS\jwsdp-1_0_01\webapps\mydcs\WEB-INF\classes2003-04-09
> > 01:47:27 ContextConfig[/mydcs] Parse error in application web.xml
> >> java.lang.reflect.InvocationTargetException
> >> at
> >>
> > org.apache.commons.digester.Digester.createSAXException(Digester.java:2033)
> > ......
> >>    .....
> >>     .....
> >> 2003-04-09 01:47:27 ContextConfig[/mydcs]: Occurred at line 41 column
> >> 20 2003-04-09 01:47:27 ContextConfig[/mydcs]: Marking this application
> >> unavailable due to previous error(s)2003-04-09 01:47:27
> > StandardManager[/mydcs]: Seeding random number
> >> generator class java.security.SecureRandom
> >> -----------------
> >> And heres web.xml
> >> ------------------
> >>
> >>
> >>
> >> <?xml version="1.0" encoding="ISO-8859-1"?>
> >>
> >> <!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>
> >> <display-name>XML Web Service for DCS</display-name>
> >>
> >> <servlet>
> >>    <servlet-name>LoginServlet</servlet-name>
> >>    <servlet-class>LoginServlet</servlet-class>
> >>    <load-on-startup>1</load-on-startup>
> >> </servlet>
> >> <!--
> >> <servlet>
> >>     <servlet-name>coreservlets.ConnectionPoolServlet</servlet-name>
> >> *****Here is line 18....its even commented out!!***
> >>     <servlet-class>coreservlets.ConnectionPoolServlet</servlet-class>
> >>     <load-on-startup>1</load-on-startup>
> >> </servlet>
> >> -->
> >> <servlet>
> >>     <servlet-name>LoginServletNoPool</servlet-name>
> >>     <servlet-class>LoginServletNoPool</servlet-class>
> >>     <load-on-startup>1</load-on-startup>
> >> </servlet>
> >>
> >> <servlet>
> >>     <servlet-name>JDOMServlet</servlet-name>
> >>     <servlet-class>JDOMServlet</servlet-class>
> >> </servlet>
> >>
> >> <servlet-mapping>
> >> <servlet-name>JDOMServlet</servlet-name>
> >> <url-pattern>/servlet</url-pattern>
> >> </servlet-mapping>
> >>
> >> <servlet-mapping>
> >> <servlet-name>coreservlets.ConnectionPoolServlet</servlet-name>
> >> <url-pattern>/servlet</url-pattern>
> >> </servlet-mapping>
> >> </web-app>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For
> > additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message