我想與澤西島的氣氛,能夠廣播消息給用戶。但是,在向Jersey端點發出請求時,以下內容將出現在日誌中,並導致ServletException。與大氣和澤西島缺少依賴關係
SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
SEVERE: Missing dependency for method public void org.apache.cxf.jaxrs.provider.JSONProvider.setMessageContext(org.apache.cxf.jaxrs.ext.MessageContext) at parameter at index 7
SEVERE: Missing dependency for field: private org.apache.cxf.jaxrs.ext.MessageContext org.apache.cxf.jaxrs.provider.RequestDispatcherProvider.mc
SEVERE: Missing dependency for method public void org.apache.cxf.jaxrs.provider.JAXBElementProvider.setMessageContext(org.apache.cxf.jaxrs.ext.MessageContext) at parameter at index 1
SEVERE: Missing dependency for field: private org.apache.cxf.jaxrs.ext.MessageContext org.apache.cxf.jaxrs.provider.MultipartProvider.mc
SEVERE: Missing dependency for method public void org.apache.cxf.jaxrs.provider.JAXBElementProvider.setMessageContext(org.apache.cxf.jaxrs.ext.MessageContext) at parameter at index 13
SEVERE: Missing dependency for field: private org.apache.cxf.jaxrs.ext.MessageContext org.apache.cxf.jaxrs.provider.FormEncodingProvider.mc
堆棧跟蹤的部分:
SEVERE: Allocate exception for servlet AtmosphereServlet
javax.servlet.ServletException
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:540)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
我使用Maven和添加以下依賴:
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-jersey</artifactId>
<version>0.6.3</version>
</dependency>
我缺少什麼?謝謝!
謝謝你,在我的情況下完美地工作,而Apache Tomcat上告訴我「嚴重:在索引14的參數缺少方法的依賴項公共無效org.apache.cxf.jaxrs.provider.RequestDispatcherProvider.setMessageContext(org.apache.cxf.jaxrs.ext.MessageContext)」只是改變mypackage.with.the.rest用於定義我的REST的軟件包的類,並且一切正常。非常感謝。 – tremendows 2013-03-19 14:48:19