users@jersey.java.net

[Jersey] jackson-mapper dependency

From: Duncan Bloem <dabloem_at_gmail.com>
Date: Sun, 2 Sep 2012 13:26:50 +0200

Hello,

When I use @JsonSerialize(using=JodaSerializers.DateTimeSerializer.class)
within my entity, I have to include jackson-mapper.jar in the war,
otherwise I receive the following error:
java.lang.TypeNotPresentException: Type
org.codehaus.jackson.map.ext.JodaSerializers$DateTimeSerializer not present
...
java.lang.ClassNotFoundException:
org.codehaus.jackson.map.ext.JodaSerializers$DateTimeSerializer

Although the jackson-mapper.jar is packaged within the modules directory of
Glassfish, it is not on the classpath it seems.

Is there any solution to prevent this CNFE without including it in the war?

Thanks,
Duncan