aspose file tools*
The moose likes XML and Related Technologies and the fly likes Could not load DTDDVFactoryImpl (xerces.jar) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Could not load DTDDVFactoryImpl (xerces.jar)" Watch "Could not load DTDDVFactoryImpl (xerces.jar)" New topic
Author

Could not load DTDDVFactoryImpl (xerces.jar)

Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 270
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?

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.

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)
...
Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 270
And here is how I load the factory:
The error occours on the line:
DocumentBuilder builder = factory.newDocumentBuilder();

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18114
    
    8

The eventual following stack trace... has no functional impact.


I interpret that to mean "It doesn't affect anything". Do you actually have a problem? If so then perhaps there's another stack trace which does affect something.
Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 270
Paul Clapham wrote:
The eventual following stack trace... has no functional impact.


I interpret that to mean "It doesn't affect anything". Do you actually have a problem? If so then perhaps there's another stack trace which does affect something.


I donĀ“t think we actually have a problem other than the wrapper.log file is growing huge "caused by errors" as we have a job running.
Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 270
I still have the problem and get an error, which means that DocumentBuilder builder is not initialized properly:

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.

I have several applications on the same Tomcat server, which create an instance of DocumentBuilderFactory:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();

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?

Any help would be appreciated.

Thanks in advance.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Could not load DTDDVFactoryImpl (xerces.jar)
 
Similar Threads
Installing Axis 1.4 jar files
Could not load java.net.BindException.
Error while removing context
java.lang.IllegalStateException
Cannot load xerces SAXParser