Salut/Hello,
Thanks for your reply. We are using Wicket in the same application but
cannot tell if that would constitute a JAX-RS provider and affect
Jersey somehow. Could the reason for why cxf and JSONProvider are
required be that we want to produce JSON responses with
@Produces("application/json")?
Here are some more information from the Tomcat log:
INFO: Server startup in 1277 ms
Dec 3, 2010 10:41:45 AM org.atmosphere.cpr.AtmosphereServlet
autoDetectAtmosphereHandlers
INFO: Atmosphere using Broadcaster org.atmosphere.cpr.DefaultBroadcaster
Dec 3, 2010 10:41:45 AM org.atmosphere.cpr.AtmosphereServlet
detectSupportedFramework
WARNING: Missing META-INF/atmosphere.xml but found the Jersey runtime.
Starting Jersey
Dec 3, 2010 10:41:45 AM org.atmosphere.cpr.AtmosphereServlet autoDetectContainer
INFO: Atmosphere is using for CometSupport:
org.atmosphere.container.TomcatCometSupport running under container
Apache Tomcat/6.0.29
Dec 3, 2010 10:41:45 AM org.atmosphere.cpr.AtmosphereServlet
configureBroadcaster
INFO: Using org.atmosphere.jersey.JerseyBroadcaster
Dec 3, 2010 10:41:45 AM com.sun.jersey.api.core.WebAppResourceConfig init
INFO: Scanning for root resource and provider classes in the Web app
resource paths:
/WEB-INF/lib
/WEB-INF/classes
Dec 3, 2010 10:41:47 AM com.sun.jersey.api.core.ScanningResourceConfig
logClasses
INFO: Root resource classes found:
class xxx.rest.HighestBidHub
Dec 3, 2010 10:41:47 AM com.sun.jersey.api.core.ScanningResourceConfig
logClasses
INFO: Provider classes found:
class org.apache.cxf.jaxrs.provider.AtomPojoProvider
class org.apache.cxf.jaxrs.provider.AegisJSONProvider
class org.apache.cxf.jaxrs.provider.DataBindingProvider
class org.atmosphere.jersey.AtmosphereResourceConfigurator
class org.apache.cxf.jaxrs.provider.XMLBeansJSONProvider
class org.atmosphere.jersey.AtmosphereResourceInjector
class org.apache.cxf.jaxrs.provider.FormEncodingProvider
class org.apache.cxf.jaxrs.provider.MultipartProvider
class org.atmosphere.jersey.BroadcasterInjector
class org.apache.cxf.jaxrs.provider.JSONProvider
class org.apache.cxf.jaxrs.provider.AtomFeedProvider
class org.apache.cxf.jaxrs.provider.AegisElementProvider
class org.apache.cxf.jaxrs.provider.XPathProvider
class org.apache.cxf.jaxrs.provider.JAXBElementProvider
class org.apache.cxf.jaxrs.provider.XSLTJaxbProvider
class org.apache.cxf.jaxrs.provider.SourceProvider
class org.apache.cxf.jaxrs.provider.XMLBeansElementProvider
class org.apache.cxf.jaxrs.provider.DataBindingJSONProvider
class org.atmosphere.jersey.BroadcasterFactoryInjector
class org.apache.cxf.jaxrs.impl.PathSegmentImpl
class org.apache.cxf.jaxrs.provider.RequestDispatcherProvider
class org.apache.cxf.jaxrs.provider.AtomEntryProvider
Dec 3, 2010 10:41:47 AM
com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5-ea01
10/08/2010 10:54 AM'
Dec 3, 2010 10:41:47 AM
com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Adding the following classes declared in
META-INF/services/jersey-server-components to the resource
configuration:
class org.atmosphere.jersey.BroadcasterInjector
class org.atmosphere.jersey.AtmosphereProviders$BroadcasterProvider
class org.atmosphere.jersey.BroadcasterFactoryInjector
class org.atmosphere.jersey.AtmosphereResourceInjector
class org.atmosphere.jersey.AtmosphereResourceConfigurator
Dec 3, 2010 10:41:48 AM com.sun.jersey.spi.inject.Errors processErrorMessages
SEVERE: The following errors and warnings have been detected with
resource and/or provider classes:
SEVERE: Missing dependency for field: private
org.apache.cxf.jaxrs.ext.MessageContext
org.apache.cxf.jaxrs.provider.MultipartProvider.mc
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 0
SEVERE: Missing dependency for field: private
org.apache.cxf.jaxrs.ext.MessageContext
org.apache.cxf.jaxrs.provider.FormEncodingProvider.mc
SEVERE: Missing dependency for method public void
org.apache.cxf.jaxrs.provider.JSONProvider.setMessageContext(org.apache.cxf.jaxrs.ext.MessageContext)
at parameter at index 6
SEVERE: Missing dependency for method public void
org.apache.cxf.jaxrs.provider.JAXBElementProvider.setMessageContext(org.apache.cxf.jaxrs.ext.MessageContext)
at parameter at index 12
Dec 3, 2010 10:41:48 AM org.atmosphere.cpr.AtmosphereServlet init
Thanks!
/K
On 02 Dec 2010 08:06:28 -0500, jfarcand <jfarcand.oss_at_gmail.com> wrote:
> Salut,
>
> adding the users_at_jersey as I don't think this is an Atmosphere issue. What puzzle me is the following:
>
> org.apache.cxf.jaxrs.provider.JSONProvider.setMessageContext(org.apache.cxf.jaxrs.ext.MessageContext)
>
> I don't understand why cfx is needed here. Do you have another JAX-RS provider on your project by any chance?
>
>A+
>-- Jeanfrancois
>
>
> On 10-12-02 2:33 AM, Kristoffer Renholm wrote:
>> Hi!
>>
>> I am trying Atmosphere together with Jersey to be able to broadcast
>> messages to users. However on request to the Jersey endpoint, the
>> following appears in the log and results in 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
>> <http://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
>> <http://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
>> <http://org.apache.cxf.jaxrs.provider.FormEncodingProvider.mc>
>>
>> Part of stacktrace:
>>
>> 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)
>>
>> I am using Maven and have added the following dependency:
>>
>> <dependency>
>> <groupId>org.atmosphere</groupId>
>> <artifactId>atmosphere-jersey</artifactId>
>> <version>0.6.3</version>
>> </dependency>
>>
>> Any one know what is missing? Thanks!
>>
>> This question is also posted on Stackoverflow,
>> http://stackoverflow.com/questions/4326904/missing-dependencies-with-atmosphere-and-jersey
>>
>> Best regards,
>> Kristoffer