]
Richard Opalka updated JBWS-2159:
---------------------------------
Fix Version/s: jbossws-native-3.0.2
Faults not handled correctly for WS-RM services
-----------------------------------------------
Key: JBWS-2159
URL:
http://jira.jboss.com/jira/browse/JBWS-2159
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: ws-reliable
Affects Versions: jbossws-native-3.0.1
Environment: Jboss AS 4.2.2.GA, Windows XP, JDK 1.5.0_08,
jbossws-3.0.1-native-2.0.4.GA
Reporter: Zach Mabe
Assigned To: Richard Opalka
Fix For: jbossws-native-3.0.2
I am getting a NullPointerException whenever a service with RM support throws a fault.
The issue seems to to be rooted in the fact that the RMInvocationHandler does not set the
RMConstant.RESPONSE_CONTEXT until after the invocation. See below the code from
RMInvocationHandler.
if (inv.getJavaMethod() != null)
{
logger.debug("Invoking method: " + inv.getJavaMethod().getName());
//app fault thrown within, handlerchain handleFault called, no RM ResponseContext for
the RMServerHandler to use, end
//up with NPE
this.delegate.invoke(ep, inv);
}
else
{
logger.debug("RM lifecycle protocol method detected");
}
setupResponseContext(rmResponseContext); //where the rmresponsecontext is set.
Here's the stacktrace for the application fault.
11:45:41,614 WARN [ServiceEndpointInvoker] Exception while processing handleFault:
com.cox.wireless.zachsservice.faults.RandomException: An error occurred
at
com.cox.wireless.zachsservice.service.AbstractWebService.doSimple(AbstractWebService.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:102)
at
org.jboss.ws.extensions.wsrm.server.RMInvocationHandler.invoke(RMInvocationHandler.java:324)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
Here's the stacktrace for the NPE which results.
11:45:41,614 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
javax.xml.ws.WebServiceException: java.lang.NullPointerException
at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleFault(HandlerChainExecutor.java:232)
at
org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callFaultHandlerChain(HandlerDelegateJAXWS.java:131)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.callFaultHandlerChain(ServiceEndpointInvoker.java:142)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:286)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: