freme-project / e-Link

Apache License 2.0
0 stars 0 forks source link

Problem with template 2 #50

Closed jnehring closed 9 years ago

jnehring commented 9 years ago

The CURL command in the attachment produces this error:

{
  "exception": "eu.freme.broker.exception.InternalServerErrorException",
  "path": "/e-link/documents/",
  "message": "Unknown problem. Please contact us.",
  "error": "Internal Server Error",
  "status": 500,
  "timestamp": 1444379042704
}

It works with other templates then template 2 so I assume this error lies within the template.

The logfile has this message:

ERROR   2015-10-09 10:27:21,769 [http-nio-8084-exec-9] eu.freme.broker.eservices.BaseRestController  - Internal service problem. Please contact the service provider.
eu.freme.common.exception.BadRequestException: It seems your SPARQL template is not correctly defined.
        at eu.freme.eservices.elink.api.DataEnricher.enrichNIF(DataEnricher.java:90)
        at eu.freme.broker.eservices.ELink.enrich(ELink.java:114)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62

curl-template-2.txt

m1ci commented 9 years ago

is this the template you are trying?

{
  "id" : 2,
  "owner" : {
    "name" : "templates",
    "role" : "ROLE_USER"
  },
  "visibility" : "PUBLIC",
  "endpoint" : "http://live.dbpedia.org/sparql",
  "query" : "PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> CONSTRUCT { ?event <http://dbpedia.org/ontology/place> <@@@entity_uri@@@> . } WHERE { ?event rdf:type <http://dbpedia.org/ontology/Event> .  ?event <http://dbpedia.org/ontology/place> <@@@entity_uri@@@> .  } LIMIT 10",
  "label" : "dataset label",
  "description" : "",
  "type" : "SPARQL"
}
jnehring commented 9 years ago

yes. the curl in the attachment says template id 2. Or do I get your question wrong?

m1ci commented 9 years ago

my question was whether the template behind the ID 2 is the one I pasted. Asking because I don't know if you are using the live or dev API. Are you trying http://api-dev.freme-project.eu/current/e-link/templates/2?outformat=json ?

jnehring commented 9 years ago

I executed the curl again and there error still occurs. It calls api-dev.freme-project.eu (-> dev API). So yes I am trying http://api-dev.freme-project.eu/current/e-link/templates/2?outformat=json

m1ci commented 9 years ago

OK, thanks for this info, let me check whats wrong with the template.

m1ci commented 9 years ago

fixed. please check