Bug 35720 - Updating JSP causes error "Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException"
Summary: Updating JSP causes error "Provider org.apache.xerces.jaxp.SAXParserFactoryIm...
Status: RESOLVED DUPLICATE of bug 35243
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.9
Hardware: PC Windows Server 2003
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-13 18:20 UTC by acdixon
Modified: 2005-07-15 17:47 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description acdixon 2005-07-13 18:20:13 UTC
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

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 can include any related XMLs upon request. The problem seems to occur with all
JSPs, but I can include a sample if it will be helpful.

I posted this before (Bug 35243), and it was labeled invalid. I was told to
investigate via tomcat-user. I have done this, and have received only one
response, which was not helpful. I contacted a second developer, and he agreed
that it sounded more like a bug, so I am posting it again.
Comment 1 acdixon 2005-07-15 23:16:02 UTC
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. Looking more like a bug all the time...
Comment 2 Remy Maucherat 2005-07-16 01:47:09 UTC
There's another existing bug report, use it.

*** This bug has been marked as a duplicate of 35243 ***