cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad O'Hearne <br...@neurofire.com>
Subject CXF crashing, unable to process a Collection type
Date Mon, 16 Jul 2007 04:25:03 GMT
I have a RESTful service configured with Spring. Here is the interface:

@WebService
public interface IUserService {
   
    @Post
    @HttpResource(location="/authenticate")
    AuthenticateResponse authenticate(AuthenticateRequest request) 
throws KilterException;

    @Post
    @HttpResource(location="/getEntities")
    ArrayList<User> getUsers(GetUsersRequest request) throws 
KilterException;

}


This service works without error. However, I made one change, which was 
changing the return type of the getUsers method from the ArrayList 
listed to a Collection, as follows:

    @Post
    @HttpResource(location="/getEntities")
    Collection<User> getUsers(GetUsersRequest request) throws 
KilterException;


This was the ONLY change made. Though my server loaded the service 
without error, oddly, invoking the authenticate method, in the same way 
as before, with the same exact data, resulted in the following exception 
(NOTE: the code of my actual service was never invoked, this exception 
occurred in the CXF API which was processing parameters). So apparently, 
this Collection type, though on the getUsers method, prevented the 
authenticate method from being invoked. ??? Does anyone have any idea 
why this would be, and how to rectify it? The exception is below:

INFO: Invoking POST on /authenticate
Jul 15, 2007 8:59:17 PM 
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor 
handleMessage
INFO: URIParameterInterceptor handle message on path [/authenticate] 
with content-type [application/xml]
Jul 15, 2007 8:59:17 PM org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
    at 
org.apache.cxf.binding.http.IriDecoderHelper.interopolateParams(IriDecoderHelper.java:264)
    at 
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java:124)
    at 
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:105)
    at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
    at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:67)
    at 
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:100)
    at 
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:224)
    at 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:103)
    at 
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:261)
    at 
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:239)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:270)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:227)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:211)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:623)
    at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:444)
    at java.lang.Thread.run(Thread.java:595)

Thanks,

Brad

Mime
View raw message