Waking up a year old thread, as the problem at hand is more or less a
direct followup - just with regards to problems with the newly
released CXF 2.7.0. As can be seen from the discussion below,
interceptors can be injected by specifying them in web.xml, if one is
not using Spring for setup. Today I tried out CXF 2.7.0 and I now got
a ClassNotFoundException:

LifecycleException:  java.lang.ClassNotFoundException:
org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor

                org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4979)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:5376)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:345)

As can be seen, the classname that was looked up was split over three
lines, so this means that somehow, this logic has changed in 2.7.0.
This works fine in 2.6.2. Is this an intentional change? I could not
see anything explicit in the changelog.

Using Glassfish 2.1.1, Java 1.6.0_37, OS X, CXF 2.7.0


>> The fixes in 2.4.2-SNAPSHOT (and trunk) now makes it possible to
>> register the interceptor using init-params, but I have two problems:
>>
>> 1. JSONP support demands two outinterceptors (in addition to the
>> ininterceptor); a pre-stream interceptor and a post-stream
>> interceptor. How can I specify multiple interceptors using init-param?
>> I have tried with
>> <init-param>
>>            <param-name>jaxrs.outInterceptors</param-name>
>>            
>> <param-value>org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor,
>> org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor
>> </init-param>
>> , but it only picks up the last one, not both (reversing the two
>> outinterceptors above showes it).
>>
> The values are space-separated,
>
> <init-param>
>            <param-name>jaxrs.outInterceptors</param-name>
>            <param-value>
>
> org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor
>
> org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor
>            </param-value>
> </init-param>

-- 
Carl-Erik Kopseng

Reply via email to