First off, my apologies if I am sending this email to a list
that is not intended for technical questions. I have searched high and
low on the web for answers to this question (including posting on the Java
Developer forum), but I am not having any luck resolving my problem.
I’m running Java Sun System Web Server 6.1 SP5 on
Windows Server 2003. I’ve deployed a 3rd party web application that
works properly. I have also written/deployed my own servlet/struts web
application that works properly (by itself). The 3rd party application
allows for some customization (i.e., you can add links in that application to
point to other locations). I have added a link that points from the 3rd
party web application to MY web application.
The problem occurs when I do the following steps (in this exact order):
1. Deploy MY war file on the web server.
2. Bounce the web server.
3. Access the 3rd party application in a web browser.
4. Click on a link in the 3rd party application that points to MY application.
At this point I get an error (see the stack trace at the end of this email).
I DO NOT get this error if I access MY application BEFORE attempting to access
the 3rd party application.
The 3rd party application has included the following jars (among others) in
/WEB-INF/lib:
xercesImpl.jar and xml-apis.jar
And also, the 3rd party application requires the
addition of the following JVM option:
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl
Things I’ve tried include:
·
Adding xercesImpl.jar, and xml-apis.jar to
MY /WEB-INF/lib directory. Did not help.
·
Adding xercesImpl.jar, and xml-apis.jar to
the web server common directory (\Sun\WebServer6.1\bin\https\jar), and also
adding the jar files to my classpath. Did not help.
·
Adding the following code to an
initialization servlet in MY application: System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
Did not help.
My guess is that the 3rd party application is
loading/using Xerces. Then when my application loads up, my application
is attempting to use a different XML parser during struts forwarding, and the
failure happens (I should note that the error occurs when my application
attempts to forward from the a servlet to a .jsp).
I’ve been searching the web for 2 straight days now
and I’m no closer to a solution than when I started. If anybody can
help I would REALLY appreciate it…thx!
stack trace:
javax.servlet.ServletException: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:387)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:772)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:471)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:787)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
at
org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
----- Root Cause -----
javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:99)
at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:194)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:287)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:219)
at
org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspParseEventListener.java:1220)
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:802)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:125)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1157)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1115)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1111)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:239)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:227)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.loadJSP(JspServlet.java:778)
at
com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.access$000(JspServlet.java:636)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:413)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:772)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:471)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
at org.apache.struts.action.RequestProcessor.processForwardConfig
Andy
Miller
IS
Designer
Butte
College
530.895.2946