You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2013/12/01 13:20:37 UTC

[jira] [Closed] (JENA-584) JENA breaks when reading a turtle file with a dot terminated IRI

     [ https://issues.apache.org/jira/browse/JENA-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne closed JENA-584.
------------------------------


> JENA breaks when reading a turtle file with a dot terminated IRI
> ----------------------------------------------------------------
>
>                 Key: JENA-584
>                 URL: https://issues.apache.org/jira/browse/JENA-584
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: RIOT
>    Affects Versions: Jena 2.11.0
>            Reporter: Gilles Sérasset
>            Assignee: Andy Seaborne
>            Priority: Critical
>             Fix For: Jena 2.11.1
>
>
> I have a toy example turtle file to be read by JENA:
> {noformat}
> @prefix jpn:   <http://kaiko.getalp.org/dbnary/jpn/> .
> @prefix dbnary: <http://kaiko.getalp.org/dbnary#> .
> @prefix lemon: <http://www.lemon-model.net/lemon#> .
> jpn:__ws_1_青は藍より出でて藍より青し__Idiom__1
>         a                   lemon:LexicalSense ;
>         dbnary:senseNumber  "1"^^<http://www.w3.org/2001/XMLSchema#int> ;
>         dbnary:synonym      jpn:出藍の誉れ , jpn:cf. , jpn:後生おそるべし ;
>         lemon:definition    [ lemon:value  "弟子が研鑽し師を凌駕すること又はその可能性があるということ。さらには、それは、恥ずべきことでなく望ましいということ。"@ja ] .
> {noformat}
> I create a default Model m and read the file using {{m.read(url, "TURTLE")}}.
> JENA breaks with the following stack trace:
> {noformat}
> [main] ERROR org.apache.jena.riot - [line: 8, col: 49] Out of place: [COMMA]
> Exception in thread "main" org.apache.jena.riot.RiotException: [line: 8, col: 49] Out of place: [COMMA]
> 	at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:136)
> 	at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:163)
> 	at org.apache.jena.riot.lang.LangEngine.exceptionDirect(LangEngine.java:156)
> 	at org.apache.jena.riot.lang.LangEngine.exception(LangEngine.java:149)
> 	at org.apache.jena.riot.lang.LangTurtleBase.triplesSameSubject(LangTurtleBase.java:231)
> 	at org.apache.jena.riot.lang.LangTurtle.oneTopLevelElement(LangTurtle.java:44)
> 	at org.apache.jena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:90)
> 	at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:42)
> 	at org.apache.jena.riot.RDFParserRegistry$ReaderRIOTFactoryImpl$1.read(RDFParserRegistry.java:142)
> 	at org.apache.jena.riot.RDFDataMgr.process(RDFDataMgr.java:818)
> 	at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:679)
> 	at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:211)
> 	at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:184)
> 	at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:122)
> 	at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:113)
> 	at org.apache.jena.riot.adapters.RDFReaderRIOT.read(RDFReaderRIOT.java:77)
> 	at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:247)
> 	at org.getalp.dbnary.cli.RDFDiff.main(RDFDiff.java:31)
> {noformat}
> The faulty IRI is {{jpn:cf.}} (an IRI with a trailing dot). If I replace it by jpn:cf.x (note that the IRI is not dot terminated anymore, then the turtle file is read whit no error.
> As far as I know, jpn:cf. is a valid IRI and there is no reason to consider this trailing dot as a turtle termination char (as the error message suggests) as it is part of the IRI.
> Regards, Gilles,



--
This message was sent by Atlassian JIRA
(v6.1#6144)