You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "vlad.balan" <vl...@gmail.com> on 2018/12/18 13:21:54 UTC

JAX-WS: exception when using @UseAsyncMethod server side and "ws://" (Websocket) address instead of "http://"

Hello


tried using:

- WebSockets address "ws://" for a JAX-WS webservice (specified the address
in wsdl and also when publishing the web service)
- the service also uses @UseAsyncMethod server-side.


Getting exception.

Dec 18, 2018 3:20:00 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for
{http://test.com/}SomeServiceService#{http://test.com/}getMessage has thrown
exception, unwinding now
java.lang.NullPointerException
	at
org.eclipse.jetty.continuation.Servlet3Continuation.suspend(Servlet3Continuation.java:173)
	at
org.apache.cxf.transport.http_jetty.continuations.JettyContinuationWrapper.suspend(JettyContinuationWrapper.java:115)
	at
org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.adjustMethodAndParams(AbstractJAXWSMethodInvoker.java:121)
	at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
	at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
	at
org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination.invoke(Jetty9WebSocketDestination.java:108)
	at
org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination$2.run(Jetty9WebSocketDestination.java:189)
	at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:421)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:346)
	at java.lang.Thread.run(Thread.java:745)



Thanks.





--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Re: JAX-WS: exception when using @UseAsyncMethod server side and "ws://" (Websocket) address instead of "http://"

Posted by Colm O hEigeartaigh <co...@apache.org>.
Hi,

It looks like async isn't supported on the service side with websocket:

https://github.com/apache/cxf/blob/02fbea2b202db56b45efb69b48389c7ad30db391/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletRequest.java#L98

Colm.

On Tue, Dec 18, 2018 at 1:22 PM vlad.balan <vl...@gmail.com> wrote:

> Hello
>
>
> tried using:
>
> - WebSockets address "ws://" for a JAX-WS webservice (specified the address
> in wsdl and also when publishing the web service)
> - the service also uses @UseAsyncMethod server-side.
>
>
> Getting exception.
>
> Dec 18, 2018 3:20:00 PM org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> WARNING: Interceptor for
> {http://test.com/}SomeServiceService#{http://test.com/}getMessage has
> thrown
> exception, unwinding now
> java.lang.NullPointerException
>         at
>
> org.eclipse.jetty.continuation.Servlet3Continuation.suspend(Servlet3Continuation.java:173)
>         at
>
> org.apache.cxf.transport.http_jetty.continuations.JettyContinuationWrapper.suspend(JettyContinuationWrapper.java:115)
>         at
>
> org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.adjustMethodAndParams(AbstractJAXWSMethodInvoker.java:121)
>         at
>
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
>         at
>
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
>
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
>         at
>
> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
>         at
>
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>         at
>
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>         at
>
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
>         at
>
> org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination.invoke(Jetty9WebSocketDestination.java:108)
>         at
>
> org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination$2.run(Jetty9WebSocketDestination.java:189)
>         at
>
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:421)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at
>
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:346)
>         at java.lang.Thread.run(Thread.java:745)
>
>
>
> Thanks.
>
>
>
>
>
> --
> Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com