Missing dependencies with Atmosphere and Jersey -
i trying atmosphere jersey able broadcast messages users. on request jersey endpoint, following appears in log , results in servletexception.
severe: following errors , warnings have been detected resource and/or provider classes: severe: missing dependency method public void org.apache.cxf.jaxrs.provider.jsonprovider.setmessagecontext(org.apache.cxf.jaxrs.ext.messagecontext) @ parameter @ index 7 severe: missing dependency field: private org.apache.cxf.jaxrs.ext.messagecontext org.apache.cxf.jaxrs.provider.requestdispatcherprovider.mc severe: missing dependency method public void org.apache.cxf.jaxrs.provider.jaxbelementprovider.setmessagecontext(org.apache.cxf.jaxrs.ext.messagecontext) @ parameter @ index 1 severe: missing dependency field: private org.apache.cxf.jaxrs.ext.messagecontext org.apache.cxf.jaxrs.provider.multipartprovider.mc severe: missing dependency method public void org.apache.cxf.jaxrs.provider.jaxbelementprovider.setmessagecontext(org.apache.cxf.jaxrs.ext.messagecontext) @ parameter @ index 13 severe: missing dependency field: private org.apache.cxf.jaxrs.ext.messagecontext org.apache.cxf.jaxrs.provider.formencodingprovider.mc
part of stacktrace:
severe: allocate exception servlet atmosphereservlet javax.servlet.servletexception @ org.atmosphere.cpr.atmosphereservlet.init(atmosphereservlet.java:540) @ org.apache.catalina.core.standardwrapper.loadservlet(standardwrapper.java:1173) @ org.apache.catalina.core.standardwrapper.allocate(standardwrapper.java:809)
i using maven , have added following dependency:
<dependency> <groupid>org.atmosphere</groupid> <artifactid>atmosphere-jersey</artifactid> <version>0.6.3</version> </dependency>
what missing? thanks!
the problem apparently 2 implementations of jax-rs somehow existed in application. can solved making jersey scan package containing rest classes , therefore unaware of other jax-rs implementations.
<servlet> <description>atmosphereservlet</description> <servlet-name>atmosphereservlet</servlet-name> <servlet-class>org.atmosphere.cpr.atmosphereservlet</servlet-class> ... <init-param> <param-name>com.sun.jersey.config.property.packages</ param-name> <param-value>mypackage.with.the.rest.classes</param-value> </init-param> </servlet>
thanks paul sandoz on jersey mailing list , jeanfrancois on atmosphere mailing list.
Comments
Post a Comment