tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shortname <shortn...@yandex.ru>
Subject Re: Tomee 7.0.1 JAX-RS AsyncReponse throws NullPointerException
Date Sun, 07 Aug 2016 12:37:17 GMT
Seems this is keycloak-adapter bug: 
https://issues.jboss.org/browse/KEYCLOAK-3188

Thank for your help!


07.08.2016 15:08, Romain Manni-Bucau пишет:
> Hmm,
>
> This code is in cxf right? Pretty sure it works == not where the issue is.
> Is keycloak asyncSupported? If not will likely fail.
>
> Best for such an issue is to share on github a sample project failling -
> either with a tomee unit test or tomee-maven-plugin. Is that an option?
>
> Le 7 août 2016 12:53, "shortname" <shortname@yandex.ru> a écrit :
>
>> 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>(AsyncResp
>> onseImpl.java:68)
>> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRS
>> Utils.java:816)
>> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXR
>> SUtils.java:789)
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processR
>> equest(JAXRSInInterceptor.java:212)
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMe
>> ssage(JAXRSInInterceptor.java:77)
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase
>> InterceptorChain.java:308)
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(C
>> hainInitiationObserver.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(CXFJAXR
>> SFilter.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.inM
>> essage.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" <shortname@yandex.ru> 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
>>>>
>>>>


Mime
View raw message