Hi there,
I'm using Spring 3.0 with WAS 7.0. When processing a request, this code
Code:
javax.servlet.RequestDispatcher rd = request.getRequestDispatcher("/spring/test.action");
rd.forward(request, response);
results in this exception:
Code:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: argument type mismatch
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
…
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:175)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:774)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
The key part of my configuration is as follows.
In web.xml,
Code:
<servlet-mapping>
<servlet-name>Spring Dispatcher</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
In controller class,
Code:
@RequestMapping("/spring/test.action")
I was trying to figure out what causes "argument type mismatch" exception but failed. Does anyone know what might be the cause?
Thank you for your help!