You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Ben Gould (JIRA)" <ji...@apache.org> on 2015/09/29 17:03:04 UTC

[jira] [Commented] (JENA-1037) jena-osgi

    [ https://issues.apache.org/jira/browse/JENA-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14935293#comment-14935293 ] 

Ben Gould commented on JENA-1037:
---------------------------------

One note that may be important as well: I'm running in Karaf 4.0.1.  I did notice that the Apache Jena - OSGi bundle did resolve without the xerces bundle present, but after adding the bundle the same issue occurs.  Here is what my list command returns:

karaf@root()> list
START LEVEL 100 , List Threshold: 50
 ID | State  | Lvl | Version        | Name
---------------------------------------------------------------------------------------------
 58 | Active |  80 | 18.0.0         | Guava: Google Core Libraries for Java
 59 | Active |  80 | 2.6.1          | Protocol Buffer Java API
 60 | Active |  80 | 1.9.12         | Jackson JSON processor
 61 | Active |  80 | 1.9.12         | Data mapper for Jackson JSON processor
 62 | Active |  80 | 5.11.1         | activemq-camel
 63 | Active |  80 | 5.11.1         | activemq-osgi
 64 | Active |  80 | 2.15.2         | camel-blueprint
 65 | Active |  80 | 2.15.2         | camel-catalog
 66 | Active |  80 | 2.15.2         | camel-commands-core
 67 | Active |  80 | 2.15.2         | camel-core
 68 | Active |  80 | 2.15.2         | camel-core-osgi
 69 | Active |  80 | 2.15.2         | camel-hdfs2
 70 | Active |  80 | 2.15.2         | camel-jms
 71 | Active |  80 | 2.15.2         | camel-scr
 72 | Active |  80 | 2.15.2         | camel-solr
 73 | Active |  80 | 2.15.2         | camel-spring
 74 | Active |  80 | 2.15.2         | camel-karaf-commands
 75 | Active |  80 | 1.2            | Commons CLI
 76 | Active |  80 | 1.10.0         | Apache Commons Codec
 77 | Active |  80 | 3.2.1          | Commons Collections
 78 | Active |  80 | 1.5.0          | Commons Compress
 79 | Active |  80 | 1.9.0          | Commons Configuration
 80 | Active |  80 | 2.4.0          | Commons IO
 81 | Active |  80 | 2.6            | Commons Lang
 82 | Active |  80 | 3.3.0          | Apache Commons Math
 83 | Active |  80 | 3.3.0          | Commons Net
 84 | Active |  80 | 1.6.0          | Commons Pool
 85 | Active |  80 | 1.0.1          | geronimo-j2ee-management_1.1_spec
 88 | Active |  80 | 3.4.6          | ZooKeeper Bundle
 89 | Active |  80 | 4.3.6          | Apache Apache HttpClient OSGi bundle
 90 | Active |  80 | 4.3.3          | Apache Apache HttpCore OSGi bundle
 94 | Active |  80 | 1.7.7.1        | Apache ServiceMix :: Bundles :: avro
 96 | Active |  80 | 3.1.0.7        | Apache ServiceMix :: Bundles :: commons-httpclient
 97 | Active |  80 | 3.0.0.1        | Apache ServiceMix :: Bundles :: guice
 98 | Active |  80 | 2.3.0.2        | Apache ServiceMix :: Bundles :: hadoop-client
 99 | Active |  80 | 2.2.6.1        | Apache ServiceMix :: Bundles :: jaxb-impl
100 | Active |  80 | 0.1.51.1       | Apache ServiceMix :: Bundles :: jsch
101 | Active |  80 | 0.5.0.1        | Apache ServiceMix :: Bundles :: noggit
102 | Active |  80 | 2.6.0.1        | Apache ServiceMix :: Bundles :: paranamer
103 | Active |  80 | 4.10.2.1       | Apache ServiceMix :: Bundles :: SolrJ
112 | Active |  80 | 0.52.0.1       | Apache ServiceMix :: Bundles :: xmlenc
113 | Active |  80 | 1.2.0.5        | Apache ServiceMix :: Bundles :: xmlresolver
114 | Active |  80 | 3.18.0         | Apache XBean :: Spring
115 | Active |  80 | 3.9.6.Final    | Netty
116 | Active |  80 | 0.6.4          | JAXB2 Basics - Runtime
121 | Active |  80 | 1.1.0.1        | Snappy for Java
122 | Active |  80 | 3.1.4          | Stax2 API
123 | Active |  80 | 4.4.1          | Woodstox XML-processor
124 | Active |  80 | 1.10.0         | Apache Tika core
125 | Active |  80 | 1.10.0         | Apache Tika parsers
126 | Active |  80 | 5.1.0.1        | Apache ServiceMix :: Bundles :: lucene-core
127 | Active |  80 | 5.1.0.1        | Apache ServiceMix :: Bundles :: lucene-analyzers-common
128 | Active |  80 | 2.6.2          | Jackson-core
129 | Active |  80 | 2.6.2          | Jackson-annotations
130 | Active |  80 | 2.6.2          | jackson-databind
131 | Active |  80 | 1.3.1          | Apache Commons CLI
132 | Active |  80 | 3.4.0          | Apache Commons Lang
133 | Active |  80 | 1.2.0          | Apache Commons CSV
134 | Active |  80 | 0.6.0          | JSONLD Java :: Core
135 | Active |  80 | 0.9.2          | Apache Thrift
137 | Active |  80 | 0.0.1.SNAPSHOT | solr-persist
138 | Active |  80 | 0.0.1.SNAPSHOT | hdfs-ingest
139 | Active |  80 | 0.0.1.SNAPSHOT | cas-service-api
140 | Active |  80 | 0.0.1.SNAPSHOT | simple-word-count
141 | Active |  80 | 0.0.1.SNAPSHOT | content-extraction
142 | Active |  80 | 0.0.1.SNAPSHOT | cas-prov-api
146 | Active |  80 | 3.0.0          | Apache Jena - OSGi bundle
148 | Active |  80 | 2.11.0.1       | Apache ServiceMix :: Bundles :: xercesImpl
karaf@root()>

> jena-osgi
> ---------
>
>                 Key: JENA-1037
>                 URL: https://issues.apache.org/jira/browse/JENA-1037
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: Jena 3.0.0
>         Environment: Karaf
>            Reporter: Ben Gould
>
> I'm trying to create a simple interface/impl that will generate Prov-O RDF and place it on a JMS queue.  This object will live in an OSGi environment and be injected into various operating services working in a workflow.  I call the following piece of code:
> public static OntModel createModel(final String ontologyUri) {
> 		final OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
> 		model.read(ontologyUri);
> 		return model;
> 	}
> with the ontologyUri="http://www.w3.org/ns/prov-o";  but when it gets to the ModelFactory.createOntologyModel(...) it chokes with the following stack trace.  
> java.lang.IncompatibleClassChangeError: Class org.apache.jena.rdfxml.xmlinput.impl.RDFXMLParser$SAXParserWithEncodingCheck does not implement the requested interface org.xml.sax.XMLReader
>     at org.apache.jena.rdfxml.xmlinput.SAX2RDF.installHandlers(SAX2RDF.java:171)
>     at org.apache.jena.rdfxml.xmlinput.impl.RDFXMLParser.<init>(RDFXMLParser.java:63)
>     at org.apache.jena.rdfxml.xmlinput.impl.RDFXMLParser.create(RDFXMLParser.java:127)
>     at org.apache.jena.rdfxml.xmlinput.JenaReader.<init>(JenaReader.java:69)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_11]
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_11]
>     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_11]
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:408)[:1.8.0_11]
>     at java.lang.Class.newInstance(Class.java:433)[:1.8.0_11]
>     at org.apache.jena.rdf.model.impl.RDFReaderFImpl.getReader(RDFReaderFImpl.java:120)
>     at org.apache.jena.rdf.model.impl.ModelCom.read(ModelCom.java:279)
>     at org.apache.jena.ontology.OntDocumentManager.findMetadata(OntDocumentManager.java:892)
>     at org.apache.jena.ontology.OntDocumentManager.initialiseMetadata(OntDocumentManager.java:850)
>     at org.apache.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:198)
>     at org.apache.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:180)
>     at org.apache.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:164)
>     at org.apache.jena.ontology.OntDocumentManager.getInstance(OntDocumentManager.java:242)
>     at org.apache.jena.ontology.OntModelSpec.getDocumentManager(OntModelSpec.java:320)
>     at org.apache.jena.ontology.impl.OntModelImpl.getDocumentManager(OntModelImpl.java:189)
>     at org.apache.jena.ontology.impl.OntModelImpl.loadImports(OntModelImpl.java:1964)
>     at org.apache.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:151)
>     at org.apache.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:131)
>     at org.apache.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:288)
>     ... 



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