You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/03/07 21:05:38 UTC

[jira] [Commented] (JENA-1308) NullPointerException when using --graph option of sparql command line tool

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

ASF subversion and git services commented on JENA-1308:
-------------------------------------------------------

Commit 42a3da72f7c72c382f5aeb5cd939c10365ff9d18 in jena's branch refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=42a3da7 ]

JENA-1308: don't attempt to resolve against null.

> NullPointerException when using --graph option of sparql command line tool
> --------------------------------------------------------------------------
>
>                 Key: JENA-1308
>                 URL: https://issues.apache.org/jira/browse/JENA-1308
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Cmd line tools
>    Affects Versions: Jena 3.2.0, Jena 3.3.0
>         Environment: Ubuntu 16.04
> java version "1.8.0_121"
> Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
>            Reporter: Osma Suominen
>            Assignee: Andy Seaborne
>
> I tried using the {{--graph}} option for the {{sparql}} command line tool. This used to work in Jena 3.1.1. However, after upgrading to Jena 3.2.0 or the 3.3.0-SNAPSHOT build I get this NullPointerException instead (this is for 3.3.0-SNAPSHOT):
> {noformat}
> $ sparql --graph empty.nt --query query.rq
> Error creating dataset
> java.lang.NullPointerException
> 	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
> 	at java.util.regex.Matcher.reset(Matcher.java:309)
> 	at java.util.regex.Matcher.<init>(Matcher.java:229)
> 	at java.util.regex.Pattern.matcher(Pattern.java:1093)
> 	at org.apache.jena.iri.impl.Parser.<init>(Parser.java:89)
> 	at org.apache.jena.iri.impl.IRIImpl.<init>(IRIImpl.java:65)
> 	at org.apache.jena.iri.impl.AbsIRIFactoryImpl.create(AbsIRIFactoryImpl.java:40)
> 	at org.apache.jena.iri.impl.IRIFactoryImpl.create(IRIFactoryImpl.java:264)
> 	at org.apache.jena.riot.system.IRIResolver.resolveIRI(IRIResolver.java:266)
> 	at org.apache.jena.riot.system.IRIResolver.resolveString(IRIResolver.java:219)
> 	at org.apache.jena.sparql.util.DatasetUtils.addInGraphsWorker(DatasetUtils.java:198)
> 	at org.apache.jena.sparql.util.DatasetUtils.lambda$addInGraphs$0(DatasetUtils.java:181)
> 	at org.apache.jena.system.Txn.executeWrite(Txn.java:71)
> 	at org.apache.jena.sparql.util.DatasetUtils.addInGraphs(DatasetUtils.java:181)
> 	at org.apache.jena.sparql.util.DatasetUtils.addInGraphs(DatasetUtils.java:120)
> 	at arq.cmdline.ModDatasetGeneral.addGraphs(ModDatasetGeneral.java:106)
> 	at arq.cmdline.ModDatasetGeneral.createDataset(ModDatasetGeneral.java:81)
> 	at arq.cmdline.ModDatasetGeneralAssembler.createDataset(ModDatasetGeneralAssembler.java:38)
> 	at arq.cmdline.ModDataset.getDataset(ModDataset.java:36)
> 	at arq.query.getDataset(query.java:176)
> 	at arq.query.queryExec(query.java:213)
> 	at arq.query.exec(query.java:153)
> 	at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
> 	at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
> 	at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
> 	at arq.sparql.main(sparql.java:28)
> {noformat}
> {{empty.nt}} is empty, {{query.rq}} contains this minimal query:
> {noformat}
> SELECT * { ?s ?p ?o } LIMIT 10
> {noformat}
> As a workaround, switching to {{--data}} solves the problem. However, in my understanding you cannot combine {{--data}} with {{--namedGraph}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)