Hi Joachim,
I think the problem is jettison-1.0-alpha-1.jar does not contain the class:
org.codehaus.jettison.json.JSONException
that is required by the JAXBElementProvider.
See the dependencies document [1]. You need to use the
jettison-1.0-RC1.jar supplied with jersey 0.4 distribution.
(Note that for 0.5 we have improved this so that XML usage with JAXB
requires no dependency on jettison.)
Hope this helps,
Paul.
[1]
https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-0.4/jersey/docs/dependencies.html
Joachim Martin wrote:
> Hello,
>
> I am trying to get jersey 0.4 running in a webapp using Spring 2.5 with
> a JAXB resource (request and response). I have jettison-1.0-alpha-1.jar
> in WEB-INF/lib, but I get a warning about not finding JSONException, and
> then an error about injecting parameters when I request the resource.
>
> Any ideas?
> Thanks --Joachim
>
> Jan 15, 2008 9:18:09 AM
> com.sun.ws.rest.spi.service.ServiceFinder$LazyIterator hasNext
> WARNING: A dependent class, com/sun/syndication/io/FeedException, of
> provider com.sun.ws.rest.impl.provider.entity.AtomFeedProvider not
> found. The provider will not work!
> Jan 15, 2008 9:18:09 AM
> com.sun.ws.rest.spi.service.ServiceFinder$LazyIterator hasNext
> WARNING: A dependent class, com/sun/syndication/feed/WireFeed, of
> provider com.sun.ws.rest.impl.provider.entity.AtomEntryProvider not
> found. The provider will not work!
> Jan 15, 2008 9:18:09 AM
> com.sun.ws.rest.spi.service.ServiceFinder$LazyIterator hasNext
> WARNING: A dependent class, org/codehaus/jettison/json/JSONException, of
> provider com.sun.ws.rest.impl.provider.entity.JAXBElementProvider not
> found. The provider will not work!
> Jan 15, 2008 9:18:09 AM
> com.sun.ws.rest.spi.service.ServiceFinder$LazyIterator hasNext
> WARNING: A dependent class, org/codehaus/jettison/json/JSONException, of
> provider com.sun.ws.rest.impl.provider.entity.JSONArrayProvider not
> found. The provider will not work!
> Jan 15, 2008 9:18:09 AM
> com.sun.ws.rest.spi.service.ServiceFinder$LazyIterator hasNext
> WARNING: A dependent class, org/codehaus/jettison/json/JSONException, of
> provider com.sun.ws.rest.impl.provider.entity.JSONObjectProvider not
> found. The provider will not work!
> 2008-01-15 09:18:09.865::WARN: Nested in
> javax.servlet.ServletException:
> com.sun.ws.rest.api.container.ContainerException: Exception injecting
> parameters to Web resource method:
> com.sun.ws.rest.api.container.ContainerException: Exception injecting
> parameters to Web resource method
> at
> com.sun.ws.rest.impl.model.method.dispatch.EntityParamDispatchProvider$EntityParamInInvoker.getParams(EntityParamDispatchProvider.java:82)
>
> at
> com.sun.ws.rest.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:108)
>
> at
> com.sun.ws.rest.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:65)
>
> at
> com.sun.ws.rest.impl.model.method.ResourceMethodMapDispatcher.dispatch(ResourceMethodMapDispatcher.java:93)
>
> at
> com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
>
> at
> com.sun.ws.rest.impl.application.WebApplicationContext.dispatchTo(WebApplicationContext.java:105)
>
> at
> com.sun.ws.rest.impl.model.ClassDispatcher.dispatch(ClassDispatcher.java:43)
>
> at
> com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
>
> at
> com.sun.ws.rest.impl.model.RootResourceClass.dispatch(RootResourceClass.java:118)
>
> at
> com.sun.ws.rest.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:175)
>
> at
> com.sun.ws.rest.spi.container.servlet.ServletContainer.service(ServletContainer.java:116)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109