Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-2039

URI parsing fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • Jena 4.0.0
    • RIOT
    • None

    Description

      Depending on 3.18.0-SNAPSHOT, some of my tests started to fail recently. We are using URIs of the form 'wm:/abcde' - note the single slash. These URIs, it seems, can no longer be parsed.

      Here is a minimal example:

      @prefix msg:   <https://w3id.org/won/message#> .
      <wm:/jq15ga3aacsxbvl9nngw> a msg:Message .
      

      This is the exception I get:

      Exception in thread "main" org.apache.jena.riot.RiotException: [line: 3, col: 1 ] Bad IRI: <wm:/jq15ga3aacsxbvl9nngw> : Not an RDF IRI: wm:/jq15ga3aacsxbvl9nngw
      	at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.error(ErrorHandlerFactory.java:146)
      	at org.apache.jena.riot.system.ParserProfileStd.internalMakeIRI(ParserProfileStd.java:101)
      	at org.apache.jena.riot.system.ParserProfileStd.resolveIRI(ParserProfileStd.java:81)
      	at org.apache.jena.riot.system.ParserProfileStd.createURI(ParserProfileStd.java:162)
      	at org.apache.jena.riot.system.ParserProfileStd.create(ParserProfileStd.java:234)
      	at org.apache.jena.riot.lang.LangTurtleBase.tokenAsNode(LangTurtleBase.java:582)
      	at org.apache.jena.riot.lang.LangTurtleBase.node(LangTurtleBase.java:414)
      	at org.apache.jena.riot.lang.LangTriG.oneNamedGraphBlock2(LangTriG.java:115)
      	at org.apache.jena.riot.lang.LangTriG.oneTopLevelElement(LangTriG.java:49)
      	at org.apache.jena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:79)
      	at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:43)
      	at org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:185)
      	at org.apache.jena.riot.RDFParser.read(RDFParser.java:356)
      	at org.apache.jena.riot.RDFParser.parseNotUri(RDFParser.java:346)
      	at org.apache.jena.riot.RDFParser.parse(RDFParser.java:292)
      	at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:539)
      	at org.apache.jena.riot.RDFDataMgr.parseFromInputStream(RDFDataMgr.java:901)
      	at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:590)
      	at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:568)
      	at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:559)
      

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              fkleedorfer Florian Kleedorfer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m