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

Andy Seaborne edited comment on JENA-942 at 5/14/15 11:16 AM:
--------------------------------------------------------------

This is a manifestation of Java bug 
https://bugs.openjdk.java.net/browse/JDK-8029437

Possible workarounds:

# Use a different format (see below).
# Switch to SAX based parsing: {{SystemARQ.UseSAX = true ;}}
# Add a dependency on the WoodSToX STaX parser to the application project: 
{{org.codehaus.woodstox:wstx-asl}} (versions 3.2.7 and 4.0.6 seem to work)
# [Add the WoodSToX 
jar|http://repo1.maven.org/maven2/org/codehaus/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.jar]
  to the classpath.

For SPARQL result in JSON:
{noformat}
    QueryEngineHTTP qexec = (QueryEngineHTTP) 
QueryExecutionFactory.sparqlService(uri, query);
    // request JSON results
    qexec.setSelectContentType(WebContent.contentTypeResultsJSON);
    ResultSet results = qexec.execSelect();
{noformat}


was (Author: andy.seaborne):
This is a manifestation of Java bug 
https://bugs.openjdk.java.net/browse/JDK-8029437

Possible workarounds:

# Use a different format (see below).
# Switch to SAX based parsing: `SystemARQ.UseSAX = true ;`
# Add a dependency on the WoodSToX STaX parser to the application project: 
{{org.codehaus.woodstox:wstx-asl}} (versions 3.2.7 and 4.0.6 seem to work)
# [Add the WoodSToX 
jar|http://repo1.maven.org/maven2/org/codehaus/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.jar]
  to the classpath.

For SPARQL result in JSON:
{noformat}
    QueryEngineHTTP qexec = (QueryEngineHTTP) 
QueryExecutionFactory.sparqlService(uri, query);
    // request JSON results
    qexec.setSelectContentType(WebContent.contentTypeResultsJSON);
    ResultSet results = qexec.execSelect();
{noformat}

> XML results from dbpedia.org can not be parsed.
> -----------------------------------------------
>
>                 Key: JENA-942
>                 URL: https://issues.apache.org/jira/browse/JENA-942
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Andy Seaborne
>
> If dbpedia.org generates XML 1.1 results, then the use of {{<variable 
> name=.../>}} or any XML tag with {{<.../>}} can cause:
> {noformat}
> com.hp.hpl.jena.sparql.resultset.ResultSetException: Failed when initializing 
> the StAX parsing engine
> at com.hp.hpl.jena.sparql.resultset.XMLInputStAX.<init>(XMLInputStAX.java:118)
> ...
> {noformat}



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

Reply via email to