Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-373

TODO app returns 400 (bad request) when creating a TASK

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • None
    • None

    Description

      deployed server and client libs, when issuing a POST against http://localhost:8080/todo-server/rest/task (from the UI -> http://localhost:8080/todo-www/), I am getting a 400 return code

      The response body says:

      Can not instantiate value of type [simple type, class org.aerogear.todo.server.model.Project] from JSON String; no single-String constructor/factory method (through reference chain: org.aerogear.todo.server.model.Task["project"])
      

      A bit more information from the Chrome Developer tools console:

      Request URL:http://localhost:8080/todo-server/rest/task
      Request Method:POST
      Status Code:400 Bad Request
      
      = Request Headers = 
      Accept:*/*
      Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
      Accept-Encoding:gzip,deflate,sdch
      Accept-Language:en-US,en;q=0.8
      Connection:keep-alive
      Content-Length:88
      Content-Type:application/json
      Host:localhost:8080
      Origin:http://localhost:8080
      Referer:http://localhost:8080/todo-www/
      User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1
      X-Requested-With:XMLHttpRequest
      
      = Request Payload = 
      {"title":"AHlllo","date":"2012-08-15","description":"Fix a bug","project":"2","tags":[3]}
      
      
      = Response Headers = 
      Connection:close
      Content-Length:229
      Content-Type:text/plain
      Date:Wed, 15 Aug 2012 08:34:00 GMT
      Server:Apache-Coyote/1.1
      

      Attachments

        Activity

          People

            boliveir_managed_kafka_security (inactive user) Bruno Oliveira Silva (Inactive)
            mwessend@redhat.com Matthias Wessendorf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: