users@jersey.java.net

Re: [Jersey] A message body writer for Java type, class org.apache.camel.model.RouteDefinition, and MIME media type, application/json, was not found

From: James Strachan <james.strachan_at_gmail.com>
Date: Mon, 18 Jan 2010 13:00:52 +0000

2010/1/18 Jakub Podlesak <Jakub.Podlesak_at_sun.com>:
>
> RouteDefinition is a regular JAXB class:
>
> @XmlRootElement(name = "route")
> @XmlType(propOrder = {"inputs", "outputs" })
> @XmlAccessorType(XmlAccessType.PROPERTY)
> public class RouteDefinition extends ProcessorDefinition<ProcessorDefinition> implements CamelContextAware {
> ...
>
> is the jersey-json module, which should contain the required provider, activated?

camel-web is dependent on jersey-json. The issue could be that jersey
is not discovering jersey-json when its inside OSGi. i.e. the
discovery of other JAXRS plugins maybe doesn't work in OSGi?
(Typically jersey won't be able to see plugins in OSGi's class loader,
so you need to use another mechanism in OSGi land like a bundle
listener looking for new jersey extensions or something)

-- 
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/