You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Craig Dixon <di...@gmail.com> on 2005/07/18 16:52:51 UTC

Tomcat 5.5.9: SAXParser error

I have the following configuration:

JDK: 1.5.0_03
Apache Web Server: 2.0.52
Tomcat: 5.5.9
Connector: mod_jk 1.2.14
Server OS: Windows Server 2003

I encounter the following problem:
Every time I update a JSP, then try to access it via a browser, I encounter:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from
fulfilling this request.

exception

javax.servlet.ServletException: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
       javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)       
org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)
org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)
org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.9 logs.

After seeing this message, I can restart Tomcat and the JSP functions normally.
However, if I change the JSP, restart Tomcat before viewing the page, then view
the page, I still get the error. For some reason, the error actually has to be
thrown before restarting Tomcat fixes it. I know of no other fix. 

If I change two separate JSPs, I have to view the first page (throwing the
error), restart Tomcat, then view the second page (throwing the error again),
then restart Tomcat again. It is not enough to throw it once and restart to fix
all pages; the error apparently tied to each page.

I have discovered that I can make this error go away by applying the JDK 1.4.x
compatibility patch, even though my JDK is version 1.5.0_03. This, however,
caused me to get the error:

java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;

Presumably, the getTextContent() method was not present in JDK 1.4.x, thus the
patch causes this error.

When I remove the patch, the NoSuchMethodError is resolved, but the original
error returns.

I first posted this on Bugzilla (Bug 35720), where it was marked as
invalid, and I was referred to this list. I posted the error here, and
received no helpful information. When I learned of the compatibility
patch "fix", I reopened the bug on Bugzilla, but was told:

> We do not do user support. With Java 5, you're using the JAXP API as implemented by  > your vendor, so look in their docs.We also only support Tomcat on pristine JVM             > installations (no custom extensions).
>
> Please do not reopen the report.

I haven't done anything to my JVM except install it directly from Sun.
I've only customized Tomcat insofar as I have added the appropriate
jars for JSTL and JavaMail. I don't know what the JAXP API is, nor who
my vendor for it might be. I'm not even sure who I'm being told to ask
about this anymore!

Can somebody please at least steer me in the right direction with this?

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


Re: Tomcat 5.5.9: SAXParser error

Posted by Woodchuck <wo...@yahoo.com>.
hihi,

it seems the error is related to JSTL/Validator... what version of
struts are you using?  and have you properly installed them?

are you upgrading your application from an older setup? (win2k,jdk 1.4,
tc 4.x?)


woodchuck

--- Craig Dixon <di...@gmail.com> wrote:

> I have the following configuration:
> 
> JDK: 1.5.0_03
> Apache Web Server: 2.0.52
> Tomcat: 5.5.9
> Connector: mod_jk 1.2.14
> Server OS: Windows Server 2003
> 
> I encounter the following problem:
> Every time I update a JSP, then try to access it via a browser, I
> encounter:
> 
> HTTP Status 500 -
> 
> type Exception report
> 
> message
> 
> description The server encountered an internal error () that
> prevented it from
> fulfilling this request.
> 
> exception
> 
> javax.servlet.ServletException: Provider
> org.apache.xerces.jaxp.SAXParserFactoryImpl could not be
> instantiated:
> java.lang.NullPointerException
>       
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
> root cause
> 
> javax.xml.parsers.FactoryConfigurationError: Provider
> org.apache.xerces.jaxp.SAXParserFactoryImpl could not be
> instantiated:
> java.lang.NullPointerException
>        javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
>       
>
org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)
>
org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)
>
org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)
>
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
> org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
> note The full stack trace of the root cause is available in the
> Apache
> Tomcat/5.5.9 logs.
> 
> After seeing this message, I can restart Tomcat and the JSP functions
> normally.
> However, if I change the JSP, restart Tomcat before viewing the page,
> then view
> the page, I still get the error. For some reason, the error actually
> has to be
> thrown before restarting Tomcat fixes it. I know of no other fix. 
> 
> If I change two separate JSPs, I have to view the first page
> (throwing the
> error), restart Tomcat, then view the second page (throwing the error
> again),
> then restart Tomcat again. It is not enough to throw it once and
> restart to fix
> all pages; the error apparently tied to each page.
> 
> I have discovered that I can make this error go away by applying the
> JDK 1.4.x
> compatibility patch, even though my JDK is version 1.5.0_03. This,
> however,
> caused me to get the error:
> 
> java.lang.NoSuchMethodError:
> org.w3c.dom.Node.getTextContent()Ljava/lang/String;
> 
> Presumably, the getTextContent() method was not present in JDK 1.4.x,
> thus the
> patch causes this error.
> 
> When I remove the patch, the NoSuchMethodError is resolved, but the
> original
> error returns.
> 
> I first posted this on Bugzilla (Bug 35720), where it was marked as
> invalid, and I was referred to this list. I posted the error here,
> and
> received no helpful information. When I learned of the compatibility
> patch "fix", I reopened the bug on Bugzilla, but was told:
> 
> > We do not do user support. With Java 5, you're using the JAXP API
> as implemented by  > your vendor, so look in their docs.We also only
> support Tomcat on pristine JVM             > installations (no custom
> extensions).
> >
> > Please do not reopen the report.
> 
> I haven't done anything to my JVM except install it directly from
> Sun.
> I've only customized Tomcat insofar as I have added the appropriate
> jars for JSTL and JavaMail. I don't know what the JAXP API is, nor
> who
> my vendor for it might be. I'm not even sure who I'm being told to
> ask
> about this anymore!
> 
> Can somebody please at least steer me in the right direction with
> this?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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