• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Could not load DTDDVFactoryImpl (xerces.jar)

 
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 270
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And here is how I load the factory:
The error occours on the line:
DocumentBuilder builder = factory.newDocumentBuilder();

 
Sheriff
Posts: 28331
97
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 270
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 270
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
I found a beautiful pie. And a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic