Hello Romain,

You're right. Seems my issue is not related to tomee async feature. It somehow related to keycloak adapter or both. I created small test project with sync/async and keycloak adapter. Here is results:

1. no keycloak + sync = ok
2. no keycloak + async = ok
3. keycloak + sync = ok
4. keycloak + async = error

Stack trace and method:

java.lang.NullPointerException
org.apache.cxf.jaxrs.impl.AsyncResponseImpl.initContinuation(AsyncResponseImpl.java:305)
org.apache.cxf.jaxrs.impl.AsyncResponseImpl.<init>(AsyncResponseImpl.java:68)
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:816)
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:789)
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:251)
org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)

    private void initContinuation() {
ContinuationProvider provider = (ContinuationProvider)this.inMessage.get(ContinuationProvider.class.getName());
*this.cont = provider.getContinuation();*
        this.initialSuspend = true;
    }


07.08.2016 11:42, Romain Manni-Bucau пишет:
Hello Ilia,

This works out of the box. With not enough info I d say you put cxf in the
webapp instead of letting tomee do the deployment.

This service
https://github.com/rmannibucau/rblog/blob/master/src/main/java/com/github/rmannibucau/rblog/jaxrs/PostResource.java
for instance use asynv jaxrs features - Suspended - and the app has no
web.xml

Le 7 août 2016 09:36, "shortname" <[email protected]> a écrit :

I'm trying to deploy war-file with JAX-RS service (without web.xml,
annotations only) and this service works fine on Glassfish and Wildfly
without web.xml. Tomee 7.0.1 throws NullPointerException because
ContinuationProvider not found in context (I'm using @Suspended
AsyncResponse).

I found this article http://blog.clempinch.com/asyn
c-rest-cxf-and-the-continuations-api/ which suggest to add
async-supported tag to web.xml.

Can I enable async support in META-INF/context.xml for example? Or this
support should be enabled by default for JAX-RS?

Best regards, Ilia


Reply via email to