Mantis - Resin
Viewing Issue Advanced Details
4073 minor always 06-08-10 15:38 06-17-10 15:42
emil  
alex  
high  
closed 4.0.6  
fixed  
none    
none 4.0.8  
0004073: compatibility with spring's MockHttpServletRequest
(req by moltobenny)

Resin 4.0.6, Spring 3.0.2:

This:

MockHttpServletRequest mockrequest = new MockHttpServletRequest();
MockHttpServletRequest mockresponse = new MockHttpServletResponse();
...
RequestDispatcher dispatcher = webApplicationContext.getServletContext().getReque stDispatcher(path);

dispatcher.forward(mockrequest, mockresponse);

...throw the following exception:

java.lang.ClassCastException: org.springframework.mock.web.MockHttpServletReques t cannot be cast to com.caucho.server.http.CauchoRequest
at com.caucho.server.http.CauchoRequestWrapper.getCau choRequest(CauchoRequestWrapper.java:781)

I've tried everything I can think of. Help?

Notes
(0004638)
emil   
06-09-10 14:18   
full stack trace:

java.lang.ClassCastException: org.springframework.mock.web.MockHttpServletReques t cannot be cast to com.caucho.server.http.CauchoRequest
at com.caucho.server.http.CauchoRequestWrapper.getCau choRequest(CauchoRequestWrapper.java:781)
at com.caucho.server.http.CauchoRequestWrapper.getSes sionId(CauchoRequestWrapper.java:462)
at com.caucho.server.http.CauchoRequestWrapper.getSes sionId(CauchoRequestWrapper.java:464)
at com.caucho.server.http.AbstractCauchoRequest.finis hRequest(AbstractCauchoRequest.java:590)
at com.caucho.server.webapp.ForwardRequest.finishRequ est(ForwardRequest.java:112)
at com.caucho.server.webapp.RequestDispatcherImpl.for ward(RequestDispatcherImpl.java:293)
at com.caucho.server.webapp.RequestDispatcherImpl.for ward(RequestDispatcherImpl.java:121)
(0004639)
emil   
06-09-10 14:19   
bumped priority due to multiple requests
(0004642)
alex   
06-17-10 15:42   
support/1302