Yeah, I know about that JSON-P standard client api however, wanted
to have the serialization done automatically as is the case for xml.
What I did was, added:
jackson-jaxrs-1.5.4.jar
jackson-core-asl-1.7.0.jar
jackson-mapper-asl-1.7.0.jar
Included org.codehaus.jackson.jaxrs to params in web.xml
Hello Everyone,
Our environment is Tomee web profile with JAX-RS 2.0 libraries added to our
project and api jars on the server.
We are getting a MessageBodyWriter not found when creating a resource that
produces json. The quick searching
I found maven solution however, we do not use maven. Also,
Hi
No jaxrs 2 works in servlet 3 containers (if you accept to not get the full
ee integration like ejb) but this class doesnt ring a bell for me, is it a
jersey one?
Le 26 juil. 2013 18:57, Nick Khamis sym...@gmail.com a écrit :
Hello Everyone,
Our environment is Tomee web profile with JAX-RS
Romain, thank you so much for your quick response!! I really appreciate it.
Not sure really. The error I am getting is:
MessageBodyWriter not found for media type=application/json, type=class
java.util.ArrayList
And all the solutions are related to JAX-RS 1.x and maven. We are using
neither.
Romain, i'm sorry I am drawing a blank. Could you please elaborate? I just
have a simple resource:
@GET
@Produces({ MediaType.APPLICATION_JSON})
public ListWine findAll() {
System.out.println(findAll);
return dao.findAll();
}
And a web.xml (3.0) pointing to the resource. This is for JAX-RS 2.0
Hi,
If you need to use a MessageBodyWriter, it needs to be annotated @Provider
and implement the interface.
http://jackson.codehaus.org/javadoc/jax-rs/1.0/javax/ws/rs/ext/MessageBodyWriter.html
then it should get picked up automatically.
On Fri, Jul 26, 2013 at 3:20 PM, Nick Khamis
Hello John,
I was am running the following example:
http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/
Taking a closer look, his resources produce json, but there is no
actually producing of JSON?
Along with MessageBodyWriter what other options do
The regular wine example should not be an issue on Tomee if you're using
JAX-RS 1.1/1.0. I have no clue what you might need to do with JAX-RS 2.0
(this type of configuration is really not supportable at this time; you may
want to try regular Tomcat + JAX-RS 2.0).
On Fri, Jul 26, 2013 at 3:40
John thank you so much for your response. What would one expect from a
Tomcat+Jersey 2.0 combination.
Would we have support for JAX-RS 2.0 stuff like:
Resource Context (Request. Response),
Filters (Request. Response)
Interceptors (Writer, Reader),
Async
Context and Dependencies Injection 1.1
I
A single application server version only supports a single Java EE
specification revision. Right now, the only Java EE 7 compliant
application server is GlassFish. You can hack together some things (e.g.
CDI 1.1 + JAX-RS 2.0) on Tomcat 7, but it's only going to go so far.
On Fri, Jul 26, 2013
Romain, mon ami! Let's go! For now, I will Tomcat it, I thought tomee
would be closer spec'ed to EE7 (i.e., hackable). But I will downgrade
to Tomcat for now and see how far I can go.
Nick from Toronto/Montreal
Ok
Just to try to give the idea of what i was thinking of:
http://www.adam-bien.com/roller/abien/entry/configuring_jax_rs_2_01 for
server side (but jersey has its own scanning for auto discovery on server
side it seems) and json links are
12 matches
Mail list logo