DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory after using GWT's XML parser

590 views
Skip to first unread message

Petros Petrosyan

unread,
Oct 14, 2014, 11:58:20 AM10/14/14
to google-we...@googlegroups.com
I have an application which uses xml parser library - XOM ( www.xom.nu ). The parser works without any issues until I do parsing on GWT side via 

com.google.gwt.xml.client.XMLParser.

After the parsing is done on GWT client side, when I try to do another parsing with XOM, I get the following exception:

org.apache.xerces.impl.dv.DVFactoryException: DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
at org
.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)

at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.createDatatypeValidatorFactory(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.<init>(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.<init>(Unknown Source)

at nu.xom.XML1_0Parser.<init>(Unknown Source)

at nu.xom.Builder.findParser(Unknown Source)

at nu.xom.Builder.<init>(Unknown Source)

at nu.xom.Builder.<init>(Unknown Source)

at XMLParser.tryParse(XMLParser.java:42)


I have googled this issue and found different suggestions ( including http://stackoverflow.com/questions/4730103/xerces-error-org-apache-xerces-impl-dv-dtd-dtddvfactoryimpl) , however none of them helped me. 


What I found is that gwt-dev.jar and XOM they both use Xerces, so when gwt-dev.jar uses Xerces, the DTD class somehow changes and afterwards XOM's Xerces instance does not recognize the DVFactoryException as it is from another package. 

I also tried to use the java.endorsed.dirs but it didn't help.

Has anyone had similar issue? If so, please give me hint what is going on here.

Thanks,

Petros



Reply all
Reply to author
Forward
0 new messages