<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I have JAX-RS service secured by Keycloak. It works fine on Wildfly
8-10 and Glassfish 4. But on Tomee 7.0.1 async methods throws
NullPointerException (sync works fine). I have created simple
project for test on tomee 7.0.1 combination sync/async + keycloak
and here is results:<br>
<ol>
<li>no keycloak + sync = ok</li>
<li>no keycloak + async = ok</li>
<li>keycloak + sync = ok</li>
<li>keycloak + async = error</li>
</ol>
Method signature sample: <br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<br>
@GET<br>
public void findAll(@Suspended AsyncResponse response) <br>
<br>
Exception stacktrace:<br>
<p>java.lang.NullPointerException<br>
org.apache.cxf.jaxrs.impl.AsyncResponseImpl.initContinuation(AsyncResponseImpl.java:305)<br>
org.apache.cxf.jaxrs.impl.AsyncResponseImpl.<init>(AsyncResponseImpl.java:68)<br>
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:816)<br>
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:789)<br>
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)<br>
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)<br>
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)<br>
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)<br>
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)<br>
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:251)<br>
org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)<br>
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)<br>
org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)</p>
private void initContinuation() {<br>
ContinuationProvider provider =
(ContinuationProvider)this.inMessage.get(ContinuationProvider.class.getName());<br>
<b>this.cont = provider.getContinuation();</b><br>
this.initialSuspend = true;<br>
}<br>
<br>
How this issue can be resolved? May be this is tomcat adapter bug?<br>
<br>
Best regards, Ilia<br>
<br>
</body>
</html>