freme-project / pipelines

Apache License 2.0
0 stars 0 forks source link

Submitting sample template from documentation, error 500 #25

Closed andish closed 9 years ago

andish commented 9 years ago

Request

curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: b7eeb802-89f5-4e9a-bbdf-632674806e64" -H "Cache-Control: no-cache" -H "Postman-Token: 42d80d73-4bce-ea37-c27c-b9b70c23fc22" -d '{
  "label": "Spotlight-Link",
  "description": "Recognises entities using Spotlight en enriches with geo information.",
  "serializedRequests": [
    {
      "method": "POST",
      "endpoint": "http://api-dev.freme-project.eu/current/e-entity/dbpedia-spotlight/documents",
      "parameters": {
        "language": "en"
      },
      "headers": {
        "content-type": "text/plain",
        "accept": "text/turtle"
      }
    },
    {
      "method": "POST",
      "endpoint": "http://api-dev.freme-project.eu/current/e-link/documents/",
      "parameters": {
        "templateid": "3"
      },
      "headers": {
        "content-type": "text/turtle",
        "accept": "text/turtle"
      }
    }
  ]
}' 'http://api-dev.freme-project.eu/current/pipelining/templates/'

Response Status 500 Internal Server Error

{
  "exception": "eu.freme.broker.exception.InternalServerErrorException",
  "path": "/pipelining/templates/",
  "message": "could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement",
  "error": "Internal Server Error",
  "status": 500,
  "timestamp": 1445942103672
}
ghsnd commented 9 years ago

I cannot reproduce this on a local instance of the Broker; it works fine. @jnehring or @ArneBinder, can you take a look what happens on the dev instance?

ArneBinder commented 9 years ago

The value was to long: the column serializedRequests of pipelines was still an varchar(255), I changed it to longtext according to @Lob annotation in the pipeline model. Should be fixed now. @andish please close, if this solves the problem.