cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bannii <Michael.Ban...@evry.com>
Subject CXF & NIO & JAX-RS 2
Date Mon, 14 Jul 2014 16:01:54 GMT
Hi,

This February there was a thread titled "Server Side Asynchronous processing support via CXF
& NIO support" regarding an NPE thrown at AsyncResponseImpl.java:240 when trying to use
AsyncResponse. I get a simmilar stacktrace, and I prepared an own simple test maven project
demonstrating the issue (attached to the email).

In short:
 1. I use latest Jetty: 8.1.15.v20140411.
 2. In web.xml i have both 'version="3.0"' and '<async-supported>true</async-supported>'.
 3. My rest resource api is declared using AsyncResponse.

And still i get this:

java.lang.NullPointerException
    at org.apache.cxf.jaxrs.impl.AsyncResponseImpl.initContinuation(AsyncResponseImpl.java:240)
    at org.apache.cxf.jaxrs.impl.AsyncResponseImpl.<init>(AsyncResponseImpl.java:58)
    at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:775)
    at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:749)
    at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:236)
    at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:101)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    .......

Am I missing something? Can it be some async setup that is missing in my jaxrs:server declaration
inside applicationContext.xml? Currently i have there:

    <jaxrs:server address="/api">
        <jaxrs:properties/>
        <jaxrs:serviceBeans>
            <ref bean="apiResourceBean"/>
        </jaxrs:serviceBeans>
        <jaxrs:providers>
            <ref bean="jacksonProvider"/>
        </jaxrs:providers>
        <jaxrs:features>
            <cxf:logging/>
        </jaxrs:features>
    </jaxrs:server>


--
Best regards
Michael

Mime
View raw message