You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2016/07/15 20:01:20 UTC

[jira] [Updated] (JENA-1210) OntModel imports not loaded

     [ https://issues.apache.org/jira/browse/JENA-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne updated JENA-1210:
--------------------------------
    Description: 
I upgraded Jena from 2.11.0 to 3.0.1 and OntModel imports stopped
working when {{getOntology()}} is called.

I traced the problem to

{{AdapterFileManager.readModelWorker(Model model, String filenameOrURI, String baseURI, String syntax)}}

where

{{model.read(in, baseURI, syntax)}}

was at some point replaced with

{{RDFDataMgr.read(model, mappedURI, baseURI, lang)}}

and therefore {{OntModelImpl.read()}} doesn't get called, and
{{OntModelImpl.loadImports()}} doesn't get called.
The workaround is to call {{OntModel.loadImports()}} explicitly.

Respective stacktraces provided below.

3.0.1

{noformat}
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:134)
at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:282)
at org.apache.jena.util.FileManager.readModel(FileManager.java:341)
at org.apache.jena.util.FileManager.readModel(FileManager.java:325)
at org.apache.jena.ontology.OntDocumentManager.read(OntDocumentManager.java:1062)
at org.apache.jena.ontology.OntDocumentManager.getOntology(OntDocumentManager.java:584)
{noformat}

2.11.0

{noformat}
com.hp.hpl.jena.ontology.impl.OntModelImpl.loadImports(OntModelImpl.java:1980)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2250)
at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:302)
at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:362)
at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:346)
at com.hp.hpl.jena.ontology.OntDocumentManager.read(OntDocumentManager.java:1063)
at com.hp.hpl.jena.ontology.OntDocumentManager.getOntology(OntDocumentManager.java:585)
{noformat}

  was:
I upgraded Jena from 2.11.0 to 3.0.1 and OntModel imports stopped
working when {{getOntology()}} is called.

I traced the problem to

{{AdapterFileManager.readModelWorker(Model
model, String filenameOrURI, String baseURI, String syntax)}}

where

{{model.read(in, baseURI, syntax)}}

was at some point replaced with

{{RDFDataMgr.read(model, mappedURI, baseURI, lang)}}

and therefore {{OntModelImpl.read()}} doesn't get called, and
{{OntModelImpl.loadImports()}} doesn't get called.
The workaround is to call {{OntModel.loadImports()}} explicitly.

Respective stacktraces provided below.

3.0.1

{noformat}
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:134)
at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:282)
at org.apache.jena.util.FileManager.readModel(FileManager.java:341)
at org.apache.jena.util.FileManager.readModel(FileManager.java:325)
at org.apache.jena.ontology.OntDocumentManager.read(OntDocumentManager.java:1062)
at org.apache.jena.ontology.OntDocumentManager.getOntology(OntDocumentManager.java:584)
{noformat}

2.11.0

{noformat}
com.hp.hpl.jena.ontology.impl.OntModelImpl.loadImports(OntModelImpl.java:1980)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2250)
at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:302)
at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:362)
at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:346)
at com.hp.hpl.jena.ontology.OntDocumentManager.read(OntDocumentManager.java:1063)
at com.hp.hpl.jena.ontology.OntDocumentManager.getOntology(OntDocumentManager.java:585)
{noformat}


> OntModel imports not loaded
> ---------------------------
>
>                 Key: JENA-1210
>                 URL: https://issues.apache.org/jira/browse/JENA-1210
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: Jena 3.0.1
>            Reporter: Martynas Jusevičius
>
> I upgraded Jena from 2.11.0 to 3.0.1 and OntModel imports stopped
> working when {{getOntology()}} is called.
> I traced the problem to
> {{AdapterFileManager.readModelWorker(Model model, String filenameOrURI, String baseURI, String syntax)}}
> where
> {{model.read(in, baseURI, syntax)}}
> was at some point replaced with
> {{RDFDataMgr.read(model, mappedURI, baseURI, lang)}}
> and therefore {{OntModelImpl.read()}} doesn't get called, and
> {{OntModelImpl.loadImports()}} doesn't get called.
> The workaround is to call {{OntModel.loadImports()}} explicitly.
> Respective stacktraces provided below.
> 3.0.1
> {noformat}
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:134)
> at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:282)
> at org.apache.jena.util.FileManager.readModel(FileManager.java:341)
> at org.apache.jena.util.FileManager.readModel(FileManager.java:325)
> at org.apache.jena.ontology.OntDocumentManager.read(OntDocumentManager.java:1062)
> at org.apache.jena.ontology.OntDocumentManager.getOntology(OntDocumentManager.java:584)
> {noformat}
> 2.11.0
> {noformat}
> com.hp.hpl.jena.ontology.impl.OntModelImpl.loadImports(OntModelImpl.java:1980)
> at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2250)
> at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:302)
> at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:362)
> at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:346)
> at com.hp.hpl.jena.ontology.OntDocumentManager.read(OntDocumentManager.java:1063)
> at com.hp.hpl.jena.ontology.OntDocumentManager.getOntology(OntDocumentManager.java:585)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)