2015-01-06T16:40:01.054760+00:00 app[web.1]: */* ->
2015-01-06T16:40:01.054762+00:00 app[web.1]: com.fasterxml.jackson.jaxrs.json.JacksonJsonProviderOn 7 Jan 2015, at 8:19, ni...@nimamontazeri.com wrote:
I'm using dropwizard to build a Restful service. I'm using halbuilder to
create json+hal media type. My resource is returning a representation with
a few links on a get request. It works perfectly fine on my dev environment
but when I deploy my service to heroku I get below exception:A message body writer for Java class java.lang.String, and Java type class
java.lang.String, and MIME media type application/hal+json was not found.
2015-01-06T16:40:01.054760+00:00 app[web.1]: / ->
2015-01-06T16:40:01.054762+00:00 app[web.1]: com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
I've not actually used Dropwizard before, but it sounds like it might be using JAX-RS under the covers, so you might need to also look at the halbuilder-jaxrs module, are you returning a String from your resource methods or a Representation?
Not sure why this would work in your dev and not on heroku, unless the way the application is being started is different somehow?
--
Mark Derricutt
http://www.theoryinpractice.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt