JAX_WS Handelr chain invocation throws java.lang.IllegalStateException on EAP6.4
john.lusted1 Jun 30, 2016 8:23 AMHi All,
Currently We are migrating webservice from websphere to Jboss EAP 6.4.Migrated services works as expected when we deploy them without handler chain stuff.But they fail with following exception when we deploy service with handler chain on runtime while hitting the end point.
3:01:40,744 FINE [org.apache.cxf.phase.PhaseInterceptorChain] (http-/10.16.189.161:8080-1) Invoking handleMessage on interceptor org.apache.cxf.ws.security.wss4j.UsernameTokenInterceptor@52414e35
13:01:40,750 FINE [org.apache.cxf.phase.PhaseInterceptorChain] (http-/10.16.189.161:8080-1) Invoking handleMessage on interceptor org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor@4149c734
13:01:40,751 FINE [org.apache.cxf.jaxws.handler.HandlerChainInvoker] (http-/10.16.189.161:8080-1) invoker for chain size: 1
13:01:40,751 FINE [org.apache.cxf.phase.PhaseInterceptorChain] (http-/10.16.189.161:8080-1) Invoking handleMessage on interceptor org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor@50a3fa8f
13:01:40,754 FINE [org.apache.cxf.jaxws.handler.HandlerChainInvoker] (http-/10.16.189.161:8080-1) invoking handlers, direction: inbound
13:01:40,754 FINE [org.apache.cxf.jaxws.handler.HandlerChainInvoker] (http-/10.16.189.161:8080-1) invoking handler of type com.aviva.esecurity.webservice.handler.ConsumerRoleAuthorisationHandler
13:01:40,754 WARNING [org.apache.cxf.jaxws.handler.HandlerChainInvoker] (http-/10.16.189.161:8080-1) Handler execution raised a runtime exception.: java.lang.IllegalStateException
at org.jboss.ws.common.injection.ThreadLocalAwareWebServiceContext.getWebServiceContext(ThreadLocalAwareWebServiceContext.java:88)
at org.jboss.ws.common.injection.ThreadLocalAwareWebServiceContext.getUserPrincipal(ThreadLocalAwareWebServiceContext.java:74)
at com.aviva.esecurity.webservice.handler.ConsumerRoleAuthorisationHandler.handleMessage(ConsumerRoleAuthorisationHandler.java:78) [classes:]
at com.aviva.esecurity.webservice.handler.ConsumerRoleAuthorisationHandler.handleMessage(ConsumerRoleAuthorisationHandler.java:19) [classes:]
at org.apache.cxf.jaxws.handler.HandlerChainInvoker.invokeHandleMessage(HandlerChainInvoker.java:359) [cxf-bundle-2.2.9.jar:2.2.9]
at org.apache.cxf.jaxws.handler.HandlerChainInvoker.invokeHandlerChain(HandlerChainInvoker.java:255) [cxf-bundle-2.2.9.jar:2.2.9]
at org.apache.cxf.jaxws.handler.HandlerChainInvoker.invokeProtocolHandlers(HandlerChainInvoker.java:132) [cxf-bundle-2.2.9.jar:2.2.9]
at org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor$JBossWSHandlerChainInvoker.invokeProtocolHandlers(HandlerAuthInterceptor.java:114)
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessageInternal(SOAPHandlerInterceptor.java:169) [cxf-bundle-2.2.9.jar:2.2.9]
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:124) [cxf-bundle-2.2.9.jar:2.2.9]
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:71) [cxf-bundle-2.2.9.jar:2.2.9]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) [cxf-api-2.7.14.redhat-1.jar:2.7.14.redhat-1]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-api-2.7.14.redhat-1.jar:2.7.14.redhat-1]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249) [cxf-bundle-2.2.9.jar:2.2.9]
at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:97)
at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:131)
at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:88)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286) [cxf-bundle-2.2.9.jar:2.2.9]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206) [cxf-bundle-2.2.9.jar:2.2.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:136)
at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.3.1.Final-redhat-1.jar:2.3.1.Final-redhat-1]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.
Please revert if anyone is aware on this issue??