PS: just tested your sample on trunk (should be the same on 1.6.0) and it works very well ;)
are you sure you have no exception? maybe you just conflict between jaxrs servlet and html? maybe define an Application with an ApplicationPath or configure tomee to let createUser.html be handled by default servlet and not jaxrs one Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-03-15 21:26 GMT+01:00 Romain Manni-Bucau <[email protected]>: > Hi > > no logs saying there was an issue with the endpoint? > > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > LinkedIn: http://fr.linkedin.com/in/rmannibucau > Github: https://github.com/rmannibucau > > > > 2014-03-15 21:13 GMT+01:00 John D. Ament <[email protected]>: >> It's odd that it would come over as a query param. Can you check the >> actual HTTP request your client is making? >> >> On Sat, Mar 15, 2014 at 3:59 PM, fulltruth <[email protected]> wrote: >>> If I take out this line: >>> >>> @Consumes(MediaType.APPLICATION_JSON) >>> >>> ...don't set Content-Type on the AJAX call, and change the createUser method >>> to this: >>> >>> public String createUser(@QueryParam("user") String userJSON) { >>> try { >>> ObjectMapper mapper = new ObjectMapper(); >>> User userBean = mapper.readValue(userJSON, User.class); >>> >>> This works just fine. So Jackson can convert from JSON to the User class >>> without any annotations. What I want is for TomEE to call Jackson and do >>> this automatically. >>> >>> >>> >>> -- >>> View this message in context: >>> http://openejb.979440.n4.nabble.com/Trying-to-read-JSON-using-Jackson-in-TomEE-tp4668215p4668216.html >>> Sent from the OpenEJB User mailing list archive at Nabble.com.
