Hi, Jena Experts:
Please excuse me if you think I am asking in a wrong place.

I created a utility package in Java to do different Jena queries. The
objective is to hide the Jena/RDF Store details from the user.

I am using Eclipse 4 for the development. When I call my utility package in
a Java main() program, it execute successfully. However, when I created an
Eclipse GUI and call the same utility package from a GUI viewPart, it fails
at the following call with a ClassCastException:

 model = TDBFactory.createDataset(CimModelStoreURL).getDefaultModel();

Caused by: java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to
javax.xml.parsers.DocumentBuilderFactory
at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:92)
at java.util.XMLUtils.load(XMLUtils.java:74)
at java.util.Properties.loadFromXML(Properties.java:868)
at com.hp.hpl.jena.util.Metadata.read(Metadata.java:76)
at com.hp.hpl.jena.util.Metadata.addMetadata(Metadata.java:54)
at com.hp.hpl.jena.util.Metadata.<init>(Metadata.java:48)
at com.hp.hpl.jena.JenaRuntime.<clinit>(JenaRuntime.java:34)
... 81 more

Without knowing exactly what's going on inside the above call, it is hard
to trouble shoot. Any advice?

Thanks a lot!

P.S.: I found this but not sure if it is relevant.
http://www.pressingquestion.com/2600422/Java-Xerces-Jar-And-Jena

Reply via email to