Dear all

and now I tried to use - following the documentation - TDB in order to
persist a data model.
I need to load and navigate an owl2 ontology in
http://webprotege.stanford.edu/#Edit:projectId=28f5a3a4-5896-42e8-8ea0-fe91aa7187a6


I am using he jars coming with   Jena-2-12-1   hence here
jena-tdb-1.1.1.jar together with jena-2.3.jar


According to the description in
https://jena.apache.org/documentation/tdb/java_api.html the commands are:

// Make a TDB-backed dataset
          String braintumordir =
"/.../ONTOLOGIEN/brain_tumour_ontology-ontologies-owl-REVISION-1/" ;
 (*)     Dataset dataset = TDBFactory.createDataset(braintumordir) ;
          dataset.begin(ReadWrite.READ) ;
          Model model = dataset.getDefaultModel() ;

// Here the model should be used????
          dataset.end() ;
       
At (*) an exception is thrown:

SEVERE: StandardWrapper.Throwable
java.lang.IncompatibleClassChangeError: Implementing class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2452)
    at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
    at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1264)
    at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1147)
    at com.hp.hpl.jena.graph.NodeFactory.createLiteral(NodeFactory.java:81)
    at com.hp.hpl.jena.sparql.graph.NodeConst.<clinit>(NodeConst.java:29)
    at
com.hp.hpl.jena.sparql.engine.optimizer.reorder.ReorderFixed.<clinit>(ReorderFixed.java:59)
    at
com.hp.hpl.jena.sparql.engine.optimizer.reorder.ReorderLib.fixed(ReorderLib.java:71)
    at com.hp.hpl.jena.tdb.sys.SystemTDB.<clinit>(SystemTDB.java:187)
    at com.hp.hpl.jena.tdb.TDB.<clinit>(TDB.java:90)
    at
com.hp.hpl.jena.tdb.setup.DatasetBuilderStd.<clinit>(DatasetBuilderStd.java:64)
    at com.hp.hpl.jena.tdb.StoreConnection.make(StoreConnection.java:227)
    at
com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction.<init>(DatasetGraphTransaction.java:75)
    at com.hp.hpl.jena.tdb.sys.TDBMaker._create(TDBMaker.java:57)
    at
com.hp.hpl.jena.tdb.sys.TDBMaker.createDatasetGraphTransaction(TDBMaker.java:45)
    at
com.hp.hpl.jena.tdb.TDBFactory._createDatasetGraph(TDBFactory.java:104)
    at com.hp.hpl.jena.tdb.TDBFactory.createDatasetGraph(TDBFactory.java:73)
    at com.hp.hpl.jena.tdb.TDBFactory.createDataset(TDBFactory.java:52)
    at com.hp.hpl.jena.tdb.TDBFactory.createDataset(TDBFactory.java:48)
    at com.semweb.semsearch.RDFNavigation.init(RDFNavigation.java:98)
    at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
    at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154)
    at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
    at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
    at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
    at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556)
    at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

And I have again no idea what to do ... in order to fix it.

My questions are:

1. How can I fix this error please ?

2. How can I instantiate an OntModel out of this model.

Thanks a lot in advance
Fabio








Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to