java - Dropwizard returns 400 on valid GET -


i'm developing dropwizard app , facing strange bug on request after have included mongojack.

i have simple query id path parameter. worked before included mongojack , added 2 annotations entity:

public class bill {     @javax.persistence.id @org.mongojack.objectid     private string id;      @javax.persistence.id @org.mongojack.objectid     public string getid() { return id; }      //... } 

what puzzles me request accepted. when debug, can step method. entity loaded mongodb memory , looks fine. suspect might serialization issue, i'm stuck. ideas?

update

seems known mongojack issue: https://github.com/devbliss/mongojack/issues/26. later want use custom dtos without objectids gets anyway, shouldn't relevant anymore. still don't understand why dropwizard maps 400 response...

what still don't understand why dropwizard maps 400 response

dropwizard, via jackson, generates json using getters (or @jsonproperty annotated fields/methods) know. if exception occurs on getters (or setters on deserialization) dropwizard automatically returns 400 bad request.

i guess makes sense since expects simple pojo dtos dumb getters , setters.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -