You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by mariam alqasab <qa...@hotmail.com> on 2015/04/14 01:21:38 UTC

ERROR: No parser factory available for tuple query result format SPARQL/XML

Hi , 
I'm really new to Marmotta.
Now I'm trying to run this simple code in eclipse 
	ClientConfiguration config = new ClientConfiguration();        config.addEndpoint(new SPARQLEndpoint("DBPedia (SPARQL)","http://dbpedia.org/sparql","^http://dbpedia\\.org/resource/.*"));                LDClientService ldclient = new LDClient(config);                String uriBerlin = "http://dbpedia.org/resource/Berlin";        ClientResponse respBerlin = ldclient.retrieveResource(uriBerlin);
        RepositoryConnection conBerlin = respBerlin.getTriples().getConnection();					
but I got the following error, how I can parse SPARQL/XML format?! : 
23:38:04.284 [main] ERROR o.a.m.l.s.p.AbstractHttpProvider - Unknown error while trying to retrieve resource http://dbpedia.org/resource/Europe: No parser factory available for tuple query result format SPARQL/XML (mimeTypes=application/sparql-results+xml, application/xml; ext=srx, xml)org.apache.marmotta.ldclient.exception.DataRetrievalException: Unknown error while trying to retrieve resource http://dbpedia.org/resource/Europe	at org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider.retrieveResource(AbstractHttpProvider.java:188)	at org.apache.marmotta.ldclient.services.ldclient.LDClient.retrieveResource(LDClient.java:217)	at TheMain.query(TheMain.java:89)	at TheMain.main(TheMain.java:152)Caused by: org.openrdf.query.resultio.UnsupportedQueryResultFormatException: No parser factory available for tuple query result format SPARQL/XML (mimeTypes=application/sparql-results+xml, application/xml; ext=srx, xml)	at org.openrdf.query.resultio.QueryResultIO.createParser(QueryResultIO.java:355)	at org.openrdf.query.resultio.QueryResultIO.parse(QueryResultIO.java:513)	at org.apache.marmotta.ldclient.provider.rdf.SPARQLProvider.parseResponse(SPARQLProvider.java:135)	at org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider$ResponseHandler.handleResponse(AbstractHttpProvider.java:264)	at org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider$ResponseHandler.handleResponse(AbstractHttpProvider.java:214)	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:218)	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:136)	at org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider.retrieveResource(AbstractHttpProvider.java:147)

Best,Mariam 		 	   		  

Re: ERROR: No parser factory available for tuple query result format SPARQL/XML

Posted by Sergio Fernández <wi...@apache.org>.
Hi Matiam,

if you're using Maven, you'd just need to declare the following dependency:

<dependency>
  <groupId>org.openrdf.sesame</groupId>
  <artifactId>sesame-queryresultio-sparqlxml</artifactId>
  <version>2.7.13</version>
  <scope>runtime</scope>
</dependency>

and then the parser factory should be automatically registered.

I've just pushed the patch for the current 3.4.0-SNAPSHOT. So from the next
release this would not be necessary.

Cheers,

On Tue, Apr 14, 2015 at 1:21 AM, mariam alqasab <qa...@hotmail.com>
wrote:

> Hi ,
> I'm really new to Marmotta.
> Now I'm trying to run this simple code in eclipse
>         ClientConfiguration config = new ClientConfiguration();
> config.addEndpoint(new SPARQLEndpoint("DBPedia (SPARQL)","
> http://dbpedia.org/sparql","^http://dbpedia\\.org/resource/.*"));
>         LDClientService ldclient = new LDClient(config);
> String uriBerlin = "http://dbpedia.org/resource/Berlin";
> ClientResponse respBerlin = ldclient.retrieveResource(uriBerlin);
>         RepositoryConnection conBerlin =
> respBerlin.getTriples().getConnection();
> but I got the following error, how I can parse SPARQL/XML format?! :
> 23:38:04.284 [main] ERROR o.a.m.l.s.p.AbstractHttpProvider - Unknown error
> while trying to retrieve resource http://dbpedia.org/resource/Europe: No
> parser factory available for tuple query result format SPARQL/XML
> (mimeTypes=application/sparql-results+xml, application/xml; ext=srx,
> xml)org.apache.marmotta.ldclient.exception.DataRetrievalException: Unknown
> error while trying to retrieve resource http://dbpedia.org/resource/Europe
>       at
> org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider.retrieveResource(AbstractHttpProvider.java:188)
> at
> org.apache.marmotta.ldclient.services.ldclient.LDClient.retrieveResource(LDClient.java:217)
> at TheMain.query(TheMain.java:89)       at
> TheMain.main(TheMain.java:152)Caused by:
> org.openrdf.query.resultio.UnsupportedQueryResultFormatException: No parser
> factory available for tuple query result format SPARQL/XML
> (mimeTypes=application/sparql-results+xml, application/xml; ext=srx, xml)
>   at
> org.openrdf.query.resultio.QueryResultIO.createParser(QueryResultIO.java:355)
>       at
> org.openrdf.query.resultio.QueryResultIO.parse(QueryResultIO.java:513)
>  at
> org.apache.marmotta.ldclient.provider.rdf.SPARQLProvider.parseResponse(SPARQLProvider.java:135)
>     at
> org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider$ResponseHandler.handleResponse(AbstractHttpProvider.java:264)
>   at
> org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider$ResponseHandler.handleResponse(AbstractHttpProvider.java:214)
>   at
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:218)
>       at
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)
>       at
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:136)
>       at
> org.apache.marmotta.ldclient.services.provider.AbstractHttpProvider.retrieveResource(AbstractHttpProvider.java:147)
>
> Best,Mariam




-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 6602747925
e: sergio.fernandez@redlink.co
w: http://redlink.co