title: HTTP Post method using curl to post data to localhost failed
body: <p>I'm trying to use HTTP GET method using:</p>
  
  <pre><code>curl http://localhost:8888/_ah/api/birra/v1/beer
  </code></pre>
  
  <p>it's returning me the current list like which is normal and expected:</p>
  
  <pre><code>{
    "items" : [ {
      "id" : "1",
      "beerName" : "Bud"
    }, {
      "id" : "2",
      "beerName" : "Steve"
    }, {
      "id" : "3",
      "beerName" : "Ankur"
    } ]
  }
  </code></pre>
  
  <p>But when i'm doing HTTP POST like this:</p>
  
  <pre><code>curl -X POST -H "Content-Type: application/json" -H "Accept:application/json" -d "{\"beerName\": \"asdf\"}" http://localhost:8888/_ah/api/birra/v1/beer
  </code></pre>
  
  <p>it's giving me error as:</p>
  
  <pre><code>{
    "error" : {
      "message" : "javax.jdo.JDOFatalInternalException: The key value passed to construct a SingleFieldIdentity of type \"class javax.jdo.identity.LongIdentity\" for class \"class com.samples.Beer\" is null.\nNestedThrowables:\norg.datanucleus.exceptions.NucleusException: The key value passed to construct a SingleFieldIdentity of type \"class javax.jdo.identity.LongIdentity\" for class \"class com.samples.Beer\" is null.",
      "code" : 503,
      "errors" : [ {
        "domain" : "global",
        "reason" : "backendError",
        "message" : "javax.jdo.JDOFatalInternalException: The key value passed to construct a SingleFieldIdentity of type \"class javax.jdo.identity.LongIdentity\" for class \"class com.samples.Beer\" is null.\nNestedThrowables:\norg.datanucleus.exceptions.NucleusException: The key value passed to construct a SingleFieldIdentity of type \"class javax.jdo.identity.LongIdentity\" for class \"class com.samples.Beer\" is null."
      } ]
    }
  }
  </code></pre>
  
  <p>I'm currently working on Google Cloud Endpoints sample provided on:
  <a href="http://ido-green.appspot.com/CloudEndpoints/CloudEndpointsWebBlogPost.html" rel="nofollow">Cloud Endpoint by Google Developers</a></p>
  
  <p>I'm using Eclipse IDE with server localhost running on Jetty.</p>
  
  <p>Any solutions?</p>