2

This is my config.ttl

# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

@prefix :        <#> .
@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .


[] rdf:type fuseki:Server ;
   fuseki:services (
     <#service4>
   ) .

# Custom code.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .

# TDB
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

## ---------------------------------------------------------------

<#service4> rdf:type fuseki:Service ;
    rdfs:label                          "Movies" ;
    fuseki:name                         "Movies" ;
    fuseki:serviceQuery                 "query" ;
    fuseki:serviceQuery                 "sparql" ;
    fuseki:serviceReadGraphStore        "get" ;
    fuseki:dataset                      <#datasetmovies> ;
.

<#datasetmovies> rdf:type       ja:RDFDataset ;
ja:defaultGraph       <#model_infmovies> ;
.


<#model_infmovies> a ja:InfModel ;
    ja:baseModel <#tdbGraphmovies> ;
  .

<#tdbGraphmovies> rdf:type tdb:GraphTDB ;
    tdb:dataset <#MoviesDataSet>
.

<#MoviesDataSet> rdf:type  tdb:DatasetTDB ;
    tdb:location "MoviesDS" ;
    tdb:unionDefaultGraph false ;
.

when i run fuseki, I find my dataset Movies, but when i upload the .nt file, i get this error:

Result: failed with message "SyntaxError: JSON Parse error: Unrecognized token '<'"

enter image description here

The file is from offical movie, here http://www.cs.toronto.edu/~oktie/linkedmdb/ and the name of the file is: linkedmdb-latest-dump.zip (about 41MB), please download it and unzip it, then you will get the file .nt

Update 1

It sounds like even when i use a correct .ttl file, i have the same problem, probably it is no correct my confige.ttl file, could you check please ?

Update

Even with this data

@prefix : <http://example.org/rs#>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

:A   rdfs:subClassOf :B .
:B   rdfs:subClassOf :C .
:i  a   :A .

I still get the same error

Help please

Ania David
  • 1,168
  • 1
  • 15
  • 36

2 Answers2

0

One thing that strikes me as odd in your config.ttl file is that you have not enabled the Fuseki upload service:

<#service1> fuseki:serviceUpload "upload" ; # Non-SPARQL upload service

I seem to remember that you need to enable that service to use file uploads in the UI, but I don't remember for sure.

0

Wanted to post a comment but could not due to my low reputation. So posting here.
I wanted to know if you ever found solution to this issue. I am trying to parse the same dataset using python (rdflib) and I am also getting parse error. Now, I am wondering if there is a problem with the dataset.
Syntax:

from rdflib import Graph
g = Graph()
g.parse("path_to_file/linkedmdb-latest-dump.nt", format="nt")

Error Message:

rdflib.plugins.parsers.ntriples.ParseError: Invalid line:u'<http://data.linkedmdb.org/resource/country/iso alpha2> .'
RDangol
  • 179
  • 9