Create OntModel from SDJenaFactory Model: Not a supported accept type(s): [application/trig]

5 views
Skip to first unread message

luigi...@gmail.com

unread,
Sep 27, 2015, 5:19:19 AM9/27/15
to Stardog
Hi,
I'm trying to create an OntModel from Model created with SDJenaFactory with this code:

Model aModel = SDJenaFactory.createModel(aConn);
OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, aModel);

but I have this exception:

Exception in thread "main" com.hp.hpl.jena.shared.JenaException: com.complexible.stardog.security.ResourceExistsException: Not a supported accept type(s): [application/trig]
at com.complexible.stardog.jena.StardogJenaGraph.graphBaseFind(StardogJenaGraph.java:208)
at com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:268)
at com.hp.hpl.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:290)
at com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:287)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.listStatements(ModelCom.java:458)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.listStatements(ModelCom.java:464)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.listImportedOntologyURIs(OntModelImpl.java:2065)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.listImportedOntologyURIs(OntModelImpl.java:2036)
at com.hp.hpl.jena.ontology.OntDocumentManager.queueImports(OntDocumentManager.java:825)
at com.hp.hpl.jena.ontology.OntDocumentManager.loadImports(OntDocumentManager.java:704)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.loadImports(OntModelImpl.java:1975)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:150)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:122)
at com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:370)
at ldl.JenaIntegration.main(JenaIntegration.java:25)
Caused by: com.complexible.stardog.security.ResourceExistsException: Not a supported accept type(s): [application/trig]
at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:363)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:241)
at com.complexible.stardog.protocols.http.client.HttpClientImpl.graph(HttpClientImpl.java:412)
at com.complexible.stardog.protocols.http.client.HttpClientImpl.graph(HttpClientImpl.java:92)
at com.complexible.stardog.api.impl.SPECGraphQuery.execute(SPECGraphQuery.java:47)
at com.complexible.stardog.api.impl.SPECGraphQuery.execute(SPECGraphQuery.java:33)
at com.complexible.stardog.jena.StardogJenaGraph.graphBaseFind(StardogJenaGraph.java:199)
... 14 more

the connected database is not empty, I have previously loaded data from a RDF file.
Can someone help me? Thanks!

Michael Grove

unread,
Sep 28, 2015, 7:40:19 AM9/28/15
to stardog
Looks like the OntModel is trying to do something to chase down imported ontologies.  If you want to provide the data so that we can try to reproduce this, that's helpful.  An ontology that uses imports that I had locally did not produce this error.

However, if you're trying to do some reasoning, there's no reason you should be using OntModel.  If you must use the Jena API, just stick with the plain Model and leave reasoning to Stardog.  It will be faster and more scalable than what OntModel will provide.

Cheers,

Mike
 

the connected database is not empty, I have previously loaded data from a RDF file.
Can someone help me? Thanks!

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Reply all
Reply to author
Forward
0 new messages