This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Could not load DTDDVFactoryImpl (xerces.jar)

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

 
Marshal
Posts: 24941
61
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!