Has anybody got Jena working with the above configuration? I've
tried everything I can think of, find to read about, etc., and I'm
still not able to make Jena play nice with the Xerces that is somehow
being resolved. If the Joseki crew reads this list, maybe you guys
have come up against this before?
My issue is only on the reading in of model files - everything else
seems to work just fine. When I read a file in, I see the stack
trace below. The crucial part is:
- org.apache.xerces.impl.dv.DVFactoryException: DTD factory class
org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from
DTDDVFactory.
As indicated in some of the Tomcat docs, I've moved the
xercesImpl.jar and xmlApis.jar which came with Jena (and tried with
fresh version of each from the Xerces site) into the common/endorsed
directory of both Tomcat 4.1.24 and Tomcat 5.5.9, I also tried
setting up system properties such as -
Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Documen
tBuilderFactory as indicated on the Xerces site when you want to use
a non-bundled Xerces (not the one that came with the JDK)... but to
no avail. Note that I didn't find an example of a system property
reference I could set for DTDDVFactory, or I would have used that, too!
Finally, when I take my entire app classpath and run a class which
reads files from the command line, it doesn't blow up! I suppose
this is more likely a Tomcat issue, but since none of my other
libraries and tools have trouble reading their XML files, I thought
I'd see if anyone here has similar issues...
Thanks for any insight you can offer,
Ben
Caused by: com.hp.hpl.jena.shared.JenaException: rethrew:
org.apache.xerces.impl.dv.DVFactoryException: DTD factory class
org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from
DTDDVFactory.
at com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.getReader
(RDFReaderFImpl.java:104)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:221)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.read
(OntModelImpl.java:2082)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:206)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.read
(OntModelImpl.java:2046)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.read
(OntModelImpl.java:2027)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.read
(OntModelImpl.java:1988)
at
com.advantagesforbusiness.rife.elements.AForBInstaller.doInstallOwlData(
AForBInstaller.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.uwyn.rife.engine.ElementContext.processContext
(ElementContext.java:590)
... 36 more
Caused by: 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.createDatatypeValidatorFactor
y(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.<init>(Unknown
Source)
at org.apache.xerces.parsers.StandardParserConfiguration.<init>
(Unknown Source)
at org.apache.xerces.parsers.StandardParserConfiguration.<init>
(Unknown Source)
at com.hp.hpl.jena.rdf.arp.SingleThreadedParser.create
(SingleThreadedParser.java:91)
at com.hp.hpl.jena.rdf.arp.JenaReader.<init>(JenaReader.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.getReader
(RDFReaderFImpl.java:101)
... 48 more