I believe this has been fixed in the newer versions of CXF. I would suggest upgrading to at least 2.1.6, but 2.2.3 is probably a better option.
Dan On Fri August 7 2009 6:30:35 pm JSP wrote: > I am getting a null pointer in handleMessage method of the > HolderInInterceptor in cxf-2.1.3. > > Here is the stacktrace: > Aug 7, 2009 6:17:40 PM org.apache.cxf.phase.PhaseInterceptorChain > doIntercept > INFO: Interceptor has thrown exception, unwinding now > java.lang.NullPointerException > at > org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderI >nInterceptor.java:72) at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai >n.java:220) at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO >bserver.java:78) at > org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestinati >on.java:92) at > org.apache.cxf.transport.servlet.ServletController.invokeDestination(Servle >tController.java:285) at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController >.java:168) at > org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServl >et.java:175) at > org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServl >et.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) > > Here is the annotated method I am trying to call: > @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED, use = > SOAPBinding.Use.LITERAL, style = SOAPBinding.Style.DOCUMENT) > @ResponseWrapper(className = "LoadTeamsAndPlayersResponse", localName = > "LoadTeamsAndPlayersResponse") > @RequestWrapper(className = "LoadTeamsAndPlayers", localName = > "LoadTeamsAndPlayers") > @WebMethod(operationName = "LoadTeamsAndPlayers") > > public void loadTeamsAndPlayers( > @WebParam(partName = "outTeamsPart", mode = WebParam.Mode.OUT, name = > "outTeams") Holder<Set<Team>> outTeams, > @WebParam(partName = "outPlayersPart", mode = WebParam.Mode.OUT, name = > "outPlayers") Holder<Set<Player>> outPlayers) throws java.lang.Exception; > > Does anybody see anything wrong with this? > > It looks like I get null for inObjects which seems fine since I don't have > any inputs. Then I get two parts back from getOutput().getMessageParts(). > The first part has an index = 1 so it tries to access inObjects.size() - > inObjects is null. -- Daniel Kulp [email protected] http://www.dankulp.com/blog
