You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Sarven Capadisli (JIRA)" <ji...@apache.org> on 2013/04/23 21:33:16 UTC

[jira] [Created] (JENA-444) "Error 500: java.nio.charset.MalformedInputException: Input length = 1" for a federated SPARQL query with multiple triple patterns (in inner query), where one of them uses SPARQL property paths

Sarven Capadisli created JENA-444:
-------------------------------------

             Summary: "Error 500: java.nio.charset.MalformedInputException: Input length = 1" for a federated SPARQL query with multiple triple patterns (in inner query), where one of them uses SPARQL property paths
                 Key: JENA-444
                 URL: https://issues.apache.org/jira/browse/JENA-444
             Project: Apache Jena
          Issue Type: Bug
          Components: Fuseki, Jena, TDB
    Affects Versions: Jena 2.10.1, TDB 0.10.1
         Environment: Ubuntu
            Reporter: Sarven Capadisli


The following query throws HttpException: java.nio.charset.MalformedInputException: Input length = 1: java.nio.charset.MalformedInputException: Input length = 1 (whether query is requested over Fuseki or TDB)

At SPARQL endpoint: http://transparency.270a.info/sparql

PREFIX qb: <http://purl.org/linked-data/cube#>

SELECT *
WHERE {
    SERVICE <http://worldbank.270a.info/sparql> {
        SELECT ?observationX ?componentMeasureX
        WHERE {
            <http://worldbank.270a.info/dataset/AG.AGR.TRAC.NO> qb:structure/qb:component/qb:measure ?componentMeasureX .
            ?observationX qb:dataSet <http://worldbank.270a.info/dataset/AG.AGR.TRAC.NO> .
        }
    }
}


Some test results:
* If either one of the triple patterns in the inner query is commented out, the query returns a response

* The inner query alone returns a response if done at http://worldbank.270a.info/sparql

* If a SPARQL property path inside SERVICE is not the only triple pattern, it throws an error.




Full error:

HttpException: java.nio.charset.MalformedInputException: Input length = 1: java.nio.charset.MalformedInputException: Input length = 1
        at com.hp.hpl.jena.sparql.engine.http.HttpQuery.execCommon(HttpQuery.java:525)
        at com.hp.hpl.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:289)
        at com.hp.hpl.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:240)
        at com.hp.hpl.jena.sparql.engine.http.Service.exec(Service.java:132)
        at com.hp.hpl.jena.sparql.engine.main.iterator.QueryIterService.nextStage(QueryIterService.java:51)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:115)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:67)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:40)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:40)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:40)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
        at com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:75)
        at com.hp.hpl.jena.sparql.resultset.ResultSetMem.<init>(ResultSetMem.java:97)
        at com.hp.hpl.jena.query.ResultSetFactory.makeRewindable(ResultSetFactory.java:420)
        at com.hp.hpl.jena.sparql.resultset.TextOutput.write(TextOutput.java:149)
        at com.hp.hpl.jena.sparql.resultset.TextOutput.write(TextOutput.java:132)
        at com.hp.hpl.jena.sparql.resultset.TextOutput.write(TextOutput.java:120)
        at com.hp.hpl.jena.sparql.resultset.TextOutput.format(TextOutput.java:67)
        at com.hp.hpl.jena.query.ResultSetFormatter.out(ResultSetFormatter.java:135)
        at com.hp.hpl.jena.sparql.util.QueryExecUtils.outputResultSet(QueryExecUtils.java:157)
        at com.hp.hpl.jena.sparql.util.QueryExecUtils.doSelectQuery(QueryExecUtils.java:199)
        at com.hp.hpl.jena.sparql.util.QueryExecUtils.executeQuery(QueryExecUtils.java:75)
        at arq.query.queryExec(query.java:187)
        at arq.query.exec(query.java:144)
        at arq.cmdline.CmdMain.mainMethod(CmdMain.java:101)
        at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
        at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
        at tdb.tdbquery.main(tdbquery.java:34)
Caused by: java.nio.charset.MalformedInputException: Input length = 1
        at java.nio.charset.CoderResult.throwException(CoderResult.java:277)
        at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:338)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
        at java.io.InputStreamReader.read(InputStreamReader.java:184)
        at java.io.BufferedReader.read1(BufferedReader.java:203)
        at java.io.BufferedReader.read(BufferedReader.java:279)
        at java.io.Reader.read(Reader.java:140)
        at com.hp.hpl.jena.util.FileUtils.readWholeFileAsUTF8(FileUtils.java:458)
        at com.hp.hpl.jena.util.FileUtils.readWholeFileAsUTF8(FileUtils.java:442)
        at com.hp.hpl.jena.sparql.engine.http.HttpQuery.execCommon(HttpQuery.java:438)
        ... 30 more



$ java tdb.tdbquery --version
Jena:       VERSION: 2.10.1-SNAPSHOT
Jena:       BUILD_DATE: 2013-04-19T10:04:25+0100
ARQ:        VERSION: 2.10.1-SNAPSHOT
ARQ:        BUILD_DATE: 2013-04-19T10:04:25+0100
RIOT:       VERSION: 2.10.1-SNAPSHOT
RIOT:       BUILD_DATE: 2013-04-19T10:04:25+0100
TDB:        VERSION: 0.10.1-SNAPSHOT
TDB:        BUILD_DATE: 2013-04-19T10:04:25+0100

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira