Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-781

Error when using the alias "a" instead of rdf:type for a multipart insert

    Details

    • Type: Bug
    • Status: Closed - Won't Fix
    • Resolution: Incomplete
    • Affects Version/s: BIGDATA_RELEASE_1_2_2
    • Fix Version/s: None
    • Component/s: NanoSparqlServer
    • Labels:
      None

      Description

      Hi,

      Using the alias "a" instead of rdf:type for a multipart insert causes a 500 internal error on response. On debug the server exception is ok: unexpected character "a".

      I'm using bigdata 1.22 with jetty.
      I will attach request/response samples.

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        You need to specify the correct content type in your request:

        Content-Type: text/plain
        	
        <http://tok.com/Cars> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
        

        text/plain is not an RDF Mime type. See the REST API wiki page for the supported MIME Types [1].

        [1] https://sourceforge.net/apps/mediawiki/bigdata/index.php?title=NanoSparqlServer#MIME_Types

        Show
        bryanthompson bryanthompson added a comment - You need to specify the correct content type in your request: Content-Type: text/plain <http://tok.com/Cars> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> . text/plain is not an RDF Mime type. See the REST API wiki page for the supported MIME Types [1] . [1] https://sourceforge.net/apps/mediawiki/bigdata/index.php?title=NanoSparqlServer#MIME_Types
        Hide
        feugen24 feugen24 added a comment -

        I'm not sure I follow you. From wiki:

        text/plain 	.nt 	US-ASCII 	N-Triples
        

        also the sample in the comment you added is from "ValidRequest_CorrectResponse.txt", and in this case it works fine. Problem is with " ValidRequest_ServerError.txt"

        Show
        feugen24 feugen24 added a comment - I'm not sure I follow you. From wiki: text/plain .nt US-ASCII N-Triples also the sample in the comment you added is from "ValidRequest_CorrectResponse.txt", and in this case it works fine. Problem is with " ValidRequest_ServerError.txt"
        Hide
        bryanthompson bryanthompson added a comment -

        From [1,2]. Note that [1] points to [2] as the updated version of N-Triples.

        triple 	::= 	subject ws+ predicate ws+ object ws* '.' ws* 	
        subject 	::= 	uriref | nodeID 	
        predicate 	::= 	uriref 	
        object 	::= 	uriref | nodeID | literal
        uriref 	::= 	'<' absoluteURI '>'
        

        If you look at the grammar, you will see that each URI must be an absolute URI. "a" is not part of N-Triples.

        ----

        In general, this sort of problem is either likely to be the wrong MIME Type, user error (i.e., the content does not conform to the specification), or a problem with the underlying RDF parser. The RDF parsers are part of openrdf, so a real problem with the parser would have to be a ticket filed against that project.

        Thanks,
        Bryan

        [1] http://www.w3.org/2001/sw/RDFCore/ntriples/
        [2] http://www.w3.org/TR/rdf-testcases/#uriref

        Show
        bryanthompson bryanthompson added a comment - From [1,2] . Note that [1] points to [2] as the updated version of N-Triples. triple ::= subject ws+ predicate ws+ object ws* '.' ws* subject ::= uriref | nodeID predicate ::= uriref object ::= uriref | nodeID | literal uriref ::= '<' absoluteURI '>' If you look at the grammar, you will see that each URI must be an absolute URI. "a" is not part of N-Triples. ---- In general, this sort of problem is either likely to be the wrong MIME Type, user error (i.e., the content does not conform to the specification), or a problem with the underlying RDF parser. The RDF parsers are part of openrdf, so a real problem with the parser would have to be a ticket filed against that project. Thanks, Bryan [1] http://www.w3.org/2001/sw/RDFCore/ntriples/ [2] http://www.w3.org/TR/rdf-testcases/#uriref

          People

          • Assignee:
            bryanthompson bryanthompson
            Reporter:
            feugen24 feugen24
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: