Hello Jeppe,

The error you are getting is specific to Tomcat. I would suggest that you
ask your question on the Tomcat user mailing list.

Also note that you're not using Apache Xerces.
com.sun.org.apache.xerces.internal.* classes belong to Oracle's JDK. If you
have an issue with that implementation you would need to pursue it with
Oracle.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Jeppe Fjord <j_skov...@hotmail.com> wrote on 06/02/2011 07:31:37 AM:

> Hello.
>
> I have several application installed on the same server. Each
> application in a different context.
>
> When reloading one application in the Tomcat manager I get the
> following error: "Could not load DTDDVFactoryImpl". Why i that and
> how to avoid it?
>
> The error only occours if I restart one application. If I restart
> the tomcat container, I'm not getting the error.  I'm not sure if
> the error occours because the instance is not properly shutdown or
> because I have several applications running using the same instance?
>
> How can I avoid this error? Or how can I pick up an already created
> instance if the code fails to create a DocumentBuilder builder object?
>
> I have tried to put xerces.jar in "/apache-tomcat-5.5.25/shared/
> lib", but the error below stills occours. I have also tried to
> remove xerces.jar from tomcat/shared/lib and put it into each
> application lib: "/myApp1/WEB-INF/lib/", but the error still occours
> when reloading one application.
>
> Here is how I load the factory:

> 1. DocumentBuilderFactory factory =
> DocumentBuilderFactory.newInstance(); // here I got the error
> 2. DocumentBuilder builder = factory.newDocumentBuilder();
> 4. org.w3c.dom.Document w3cDoc = builder.parse( new java.io.File(
> XMLSetupfile ) );
> 6. if ( w3cDoc != null ){
> 8. org.jdom.input.DOMBuilder domBuilder = new org.jdom.input.DOMBuilder
();
> 9. org.jdom.Document doc = domBuilder.build( w3cDoc );
> 10. }
>
> Any help would be appreciated.
>
> Error:
> INFO: Illegal access: this web application instance has been stopped
> already. Could not load
> com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl. The
> eventual following stack trace is caused by an error thrown for
> debugging purposes as well as to attempt to terminate the thread
> which caused the illegal access, and has no functional impact.
> java.lang.IllegalStateException
> at org.apache.catalina.loader.WebappClassLoader.loadClass
> (WebappClassLoader.java:1248)
> at org.apache.catalina.loader.WebappClassLoader.loadClass
> (WebappClassLoader.java:1208)
> at
>
com.sun.org.apache.xerces.internal.impl.dv.ObjectFactory.findProviderClass
> (ObjectFactory.java:403)
> at
> com.sun.org.apache.xerces.internal.impl.dv.ObjectFactory.newInstance
> (ObjectFactory.java:354)
> at
> com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance
> (DTDDVFactory.java:98)
> at
> com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance
> (DTDDVFactory.java:83)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.<init>
> (XML11Configuration.java:565)
> at
>
com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration.<init>

> (XIncludeParserConfiguration.java:145)
> at
>
com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration.<init>

> (XIncludeParserConfiguration.java:106)
> at
> com.sun.org.apache.xerces.internal.parsers.JAXPConfiguration.<init>
> (JAXPConfiguration.java:30)
> at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>
> (DocumentBuilderImpl.java:112)
> at
>
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder

> (DocumentBuilderFactoryImpl.java:101)
> at module.oioxml.OIOXMLSetupParseXML.getInvoiceSetup
> (OIOXMLSetupParseXML.java:36)
> ...

>
> Best regards
> Jeppe

Reply via email to