freme-project / freme-ner

Apache License 2.0
6 stars 1 forks source link

[e-entity/freme-ner/datasets] creating dataset fails #136

Closed bgrusdt closed 8 years ago

bgrusdt commented 8 years ago

I am trying to create a dataset from the api-documentation:

curl -X POST --header 'Content-Type: text/n3' --header 'Accept: application/json' --header 'X-Auth-Token: 0e967abd-d989-4189-a06e-bdd784f54ffe' -d '<http://www.lib.ncsu.edu/ld/onld/00000326> <http://www.w3.org/2004/02/skos/core#prefLabel> "101 Communications" .' 'http://api-dev.freme-project.eu/current/e-entity/freme-ner/datasets?name=mysmalltestDataset&language=en&visibility=public'

which results in the following error:

INFO    2016-08-10 14:49:23,651 [http-nio-8084-exec-1] eu.freme.bservices.filters.logging.LoggingFilter  - Request: request id=180; content type=text/n3; uri=/e-entity/freme-ner/datasets?name=mysmalltestDataset&language=en&visibility=public; payload=
INFO    2016-08-10 14:49:24,005 [http-nio-8084-exec-1] eu.freme.bservices.filters.logging.LoggingFilter  - Response: request id=180; payload={
  "exception": "eu.freme.common.exception.FREMEHttpException",
  "path": "/e-entity/freme-ner/datasets",
  "message": "Error from server at http://rv2622.1blu.de/solrdev: Exception writing document id 6586d7a4-4ff4-43a0-ac0b-411aa5579580 to the index; possible analysis error.",
  "error": "Internal Server Error",
  "status": 500,
  "timestamp": 1470833363997
}

Since the log file doesnt print the stack trace I added a file that contains the stacktrace I get when I run it on my local machine, stacktrace.txt. The Exception is thrown in the scala FremeNer code

sandroacoelho commented 8 years ago

Hi @bgrusdt ,

According to your stack trace, you have tried adding a new dataset from http://localhost:8080/e-entity/freme-ner/datasets and have received an unauthorized error from http://rv2622.1blu.de/solrdev. It happens because our Solr instances under 1blue.de is not widely open.

If you want to run it locally, I would recommend using freme-docker. Also, you can access FREME through the http://api-dev.freme-project.eu for DEV or http://api.freme-project.eu for PROD. I have checked your token and run your command and works fine.

sacoelho@debian-xps:~$ curl -X POST --header 'Content-Type: text/n3' --header 'Accept: application/json' --header 'X-Auth-Token: 0e967abd-d989-4189-a06e-bdd784f54ffe' -d '<http://www.lib.ncsu.edu/ld/onld/00000326> <http://www.w3.org/2004/02/skos/core#prefLabel> "101 Communications" .' 'http://api-dev.freme-project.eu/current/e-entity/freme-ner/datasets?name=mysmalltestDataset&language=en&visibility=public'
{
  "id" : 177,
  "creationTime" : 1471220744396,
  "description" : null,
  "owner" : {
    "name" : "britta",
    "role" : "ROLE_USER"
  },
  "visibility" : "PUBLIC",
  "name" : "mysmalltestDataset",
  "totalEntities" : 1
}

Could you please try again?

Best

bgrusdt commented 8 years ago

Hi @sandroacoelho , thank you very much. I'm sorry, this was really a bad mistake. When I am connected to the Intranet everything works fine.. Thank you!