[
https://issues.apache.org/jira/browse/JENA-566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Izaskun updated JENA-566:
-------------------------
Description:
Everytime I do a:
*model.read(input, null);*
I get:
{quote}com.hp.hpl.jena.shared.ConfigException: Reader not found on classpath
at
com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.getReader(RDFReaderFImpl.java:108)
ClassNotFoundException:
org.apache.jena.riot.adapters.JenaReadersWriters$RDFReaderRIOT_RDFXML{quote}
I'm working in an OSGi blueprint environment. When I test this in a normal
environment, everything works ok.
My source code is:
{quote} final String modelText = "\n"
+ "<rdf:RDF \n"
+ " xmlns:res=\"http://www.w3.org/2005/sparql-results#\"
xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"> \n"
+ " <rdf:Description
rdf:about=\"http://www.w3.org/2005/sparql-results#ResultSet\">\n"
+ " <res:solution rdf:nodeID=\"r0\"/>\n"
+ " <res:solution rdf:nodeID=\"r1\"/>\n"
+ " <res:solution rdf:nodeID=\"r2\"/>\n"
+ " </rdf:Description>\n" + "</rdf:RDF>";
final Model model = ModelFactory.createDefaultModel();
model.read(new ByteArrayInputStream(modelText.getBytes()), null);
model.close();{quote}
I also add this in my pom, but it seems to do nothing:{quote}
<!-- jena bundle can run stand along without ARQ. However if
ARQ is present then it can call RDFReaderF to specify that
various RIOT
readers should be used instead of the ones in the jena bundle.
The jena bundle
therefore needs access to the RIOT classes. So define an optional
dependency
from the jena bundle to the arq bundle. This allows RDFReaderF to
load the
RIOT parser classes. -->
<Require-Bundle>
wrap_mvn_org.apache.jena_jena-arq_2.11.1-SNAPSHOT;resolution:=optional
</Require-Bundle>{quote}
was:
Everytime I do a:
*model.read(input, null);*
I get:
{quote}com.hp.hpl.jena.shared.ConfigException: Reader not found on classpath
at
com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.getReader(RDFReaderFImpl.java:108)
ClassNotFoundException:
org.apache.jena.riot.adapters.JenaReadersWriters$RDFReaderRIOT_RDFXML{quote}
I'm working in an OSGi blueprint environment. When I test this in a normal
environment, everything works ok.
My source code is:
{quote} final String modelText = "\n"
+ "<rdf:RDF \n"
+ " xmlns:res=\"http://www.w3.org/2005/sparql-results#\"
xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"> \n"
+ " <rdf:Description
rdf:about=\"http://www.w3.org/2005/sparql-results#ResultSet\">\n"
+ " <res:solution rdf:nodeID=\"r0\"/>\n"
+ " <res:solution rdf:nodeID=\"r1\"/>\n"
+ " <res:solution rdf:nodeID=\"r2\"/>\n"
+ " </rdf:Description>\n" + "</rdf:RDF>";
final Model model = ModelFactory.createDefaultModel();
model.read(new ByteArrayInputStream(modelText.getBytes()), null);
model.close();{quote}
> Strange behaviour of Jena in OSGi Blueprint
> -------------------------------------------
>
> Key: JENA-566
> URL: https://issues.apache.org/jira/browse/JENA-566
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Environment: OSGi blueprint ARQ 2.11.1-SNAPSHOT
> Reporter: Izaskun
> Labels: jena, osgi, riot, sdb
> Fix For: Jena 2.11.1
>
> Original Estimate: 5h
> Remaining Estimate: 5h
>
> Everytime I do a:
> *model.read(input, null);*
> I get:
> {quote}com.hp.hpl.jena.shared.ConfigException: Reader not found on classpath
> at
> com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.getReader(RDFReaderFImpl.java:108)
> ClassNotFoundException:
> org.apache.jena.riot.adapters.JenaReadersWriters$RDFReaderRIOT_RDFXML{quote}
> I'm working in an OSGi blueprint environment. When I test this in a normal
> environment, everything works ok.
> My source code is:
> {quote} final String modelText = "\n"
> + "<rdf:RDF \n"
> + " xmlns:res=\"http://www.w3.org/2005/sparql-results#\"
> xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"> \n"
> + " <rdf:Description
> rdf:about=\"http://www.w3.org/2005/sparql-results#ResultSet\">\n"
> + " <res:solution rdf:nodeID=\"r0\"/>\n"
> + " <res:solution rdf:nodeID=\"r1\"/>\n"
> + " <res:solution rdf:nodeID=\"r2\"/>\n"
> + " </rdf:Description>\n" + "</rdf:RDF>";
> final Model model = ModelFactory.createDefaultModel();
> model.read(new ByteArrayInputStream(modelText.getBytes()), null);
> model.close();{quote}
> I also add this in my pom, but it seems to do nothing:{quote}
> <!-- jena bundle can run stand along without ARQ. However if
> ARQ is present then it can call RDFReaderF to specify that
> various RIOT
> readers should be used instead of the ones in the jena bundle.
> The jena bundle
> therefore needs access to the RIOT classes. So define an
> optional dependency
> from the jena bundle to the arq bundle. This allows RDFReaderF
> to load the
> RIOT parser classes. -->
> <Require-Bundle>
>
> wrap_mvn_org.apache.jena_jena-arq_2.11.1-SNAPSHOT;resolution:=optional
> </Require-Bundle>{quote}
--
This message was sent by Atlassian JIRA
(v6.1#6144)