On 25/05/12 08:28, Dave Reynolds wrote:
This looks like a problem with the version of Xerces. Make sure you
don't have a different older Xerces on your classpath. Note that some
Java environments have an "endorsed" directory which sneaks an old copy
of Xerces onto your classpath without you being aware of it.
Dave
also - this looks like TDB 0.8.10, not TDB-0.9.0.
TDB 0.9.0 (Jena 2.7.0 on which it depends) moved to a new version of
Xerces.
TDBFactory.createModel is not encouraged - better to get the dataset and
get the default model. TDB Transactions (0.9.0) work on datasets.
Andy
On 25/05/12 02:13, Barbara Lerner wrote:
Hi,
I am new to Jena and am trying to use tdb to create a database. When I
call TDBFactory.createModel, I get the exception shown below. I have
tried using ModelFactory.createDefaultModel() and that works fine. I
thought there might be a versioning problem with external jars, but I
believe I am using the jar files that came with tdb in my build.
I would appreciate any suggestions!
Barbara
Exception in thread "main" java.lang.ExceptionInInitializerError
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:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.xerces.impl.dv.ObjectFactory.newInstance(Unknown Source)
at org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source)
at org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source)
at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.<init>(XSDDatatype.java:210)
at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.<init>(XSDDatatype.java:222)
at com.hp.hpl.jena.datatypes.xsd.impl.XSDFloat.<init>(XSDFloat.java:44)
at
com.hp.hpl.jena.datatypes.xsd.XSDDatatype.<clinit>(XSDDatatype.java:55)
at com.hp.hpl.jena.sparql.graph.NodeConst.<clinit>(NodeConst.java:16)
at
com.hp.hpl.jena.sparql.engine.optimizer.reorder.ReorderFixed.<clinit>(ReorderFixed.java:23)
at
com.hp.hpl.jena.sparql.engine.optimizer.reorder.ReorderLib.fixed(ReorderLib.java:53)
at com.hp.hpl.jena.tdb.sys.SystemTDB.<clinit>(SystemTDB.java:173)
at com.hp.hpl.jena.tdb.TDB.<clinit>(TDB.java:70)
at com.hp.hpl.jena.tdb.sys.SetupTDB.<clinit>(SetupTDB.java:70)
at
com.hp.hpl.jena.tdb.sys.DatasetGraphSetup.createDatasetGraph(DatasetGraphSetup.java:21)
at
com.hp.hpl.jena.tdb.sys.CachingTDBMaker.createDatasetGraph(CachingTDBMaker.java:46)
at com.hp.hpl.jena.tdb.sys.TDBMaker._createGraph(TDBMaker.java:71)
at com.hp.hpl.jena.tdb.TDBFactory.createGraph(TDBFactory.java:94)
at com.hp.hpl.jena.tdb.TDBFactory.createGraph(TDBFactory.java:100)
at com.hp.hpl.jena.tdb.TDBFactory.createModel(TDBFactory.java:56)
at laser.ddg.query.RdfModelFactory.getModel(RdfModelFactory.java:39)
at laser.ddg.query.RdfModelFactory.<clinit>(RdfModelFactory.java:19)
at laser.juliette.ddgbuilder.DDGBuilder.<init>(DDGBuilder.java:97)
at
laser.juliette.ddgbuilder.DDGBuilderConfigurator.visit(DDGBuilderConfigurator.java:16)
at
laser.juliette.runtime.RuntimeFactoryFactory.createRuntimeFactory(RuntimeFactoryFactory.java:13)
at laser.juliette.runner.Runner.startProcess(Runner.java:47)
at laser.juliette.runner.Runner.run(Runner.java:30)
at
laser.juliette.runner.RunnerCommandService.run(RunnerCommandService.java:22)
at laser.juliette.driver.Driver.run(Driver.java:48)
at laser.juliette.driver.Driver.main(Driver.java:25)
Caused by: java.lang.RuntimeException: internal error
at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets1(Unknown
Source)
at
org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.createBuiltInTypes(Unknown
Source)
at org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.<clinit>(Unknown
Source)
... 35 more
------------------
Barbara Lerner
Associate Professor
Computer Science Dept.
Mt. Holyoke College