title: Exception on @RequestParam annotation used from statefulJ framework
body: <p>I'm getting an exception like below when I try to get parameter from http request using spring(@RequestParam):</p>
  
  <pre><code>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  
  
  root cause
  java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
  org.statefulj.framework.core.actions.MethodInvocationAction.execute(MethodInvocationAction.java:120)
  org.statefulj.fsm.FSM.executeAction(FSM.java:228)
  org.statefulj.framework.core.fsm.FSM.transition(FSM.java:110)
  org.statefulj.fsm.FSM.onEvent(FSM.java:116)
  org.statefulj.framework.core.fsm.FSM.onEvent(FSM.java:87)
  org.statefulj.framework.core.model.impl.StatefulFSMImpl.onEvent(StatefulFSMImpl.java:74)
  org.statefulj.framework.core.model.impl.FSMHarnessImpl.onEvent(FSMHarnessImpl.java:85)
  org.statefulj.framework.persistence.jpa.JPAFSMHarnessImpl.access$001(JPAFSMHarnessImpl.java:30)
  org.statefulj.framework.persistence.jpa.JPAFSMHarnessImpl$1.doInTransaction(JPAFSMHarnessImpl.java:52)
  org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
  org.statefulj.framework.persistence.jpa.JPAFSMHarnessImpl.onEvent(JPAFSMHarnessImpl.java:47)
  statefulj.controller.StatefulJControllerMVCBinder.$_get_(StatefulJControllerMVCBinder.java)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:497)
  org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:175)
  org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
  org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  
  
  root cause
  java.lang.IllegalArgumentException: argument type mismatch
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:497)
  org.statefulj.framework.core.actions.MethodInvocationAction.invoke(MethodInvocationAction.java:149)
  org.statefulj.framework.core.actions.MethodInvocationAction.invoke(MethodInvocationAction.java:139)
  org.statefulj.framework.core.actions.MethodInvocationAction.execute(MethodInvocationAction.java:98)
  org.statefulj.fsm.FSM.executeAction(FSM.java:228)
  org.statefulj.framework.core.fsm.FSM.transition(FSM.java:110)
  org.statefulj.fsm.FSM.onEvent(FSM.java:116)
  org.statefulj.framework.core.fsm.FSM.onEvent(FSM.java:87)
  org.statefulj.framework.core.model.impl.StatefulFSMImpl.onEvent(StatefulFSMImpl.java:74)
  org.statefulj.framework.core.model.impl.FSMHarnessImpl.onEvent(FSMHarnessImpl.java:85)
  org.statefulj.framework.persistence.jpa.JPAFSMHarnessImpl.access$001(JPAFSMHarnessImpl.java:30)
  org.statefulj.framework.persistence.jpa.JPAFSMHarnessImpl$1.doInTransaction(JPAFSMHarnessImpl.java:52)
  org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
  org.statefulj.framework.persistence.jpa.JPAFSMHarnessImpl.onEvent(JPAFSMHarnessImpl.java:47)
  statefulj.controller.StatefulJControllerMVCBinder.$_get_(StatefulJControllerMVCBinder.java)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:497)
  org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:175)
  org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
  org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p>But the thing is that I use @StatefulController and statefulJ framework(<a href="http://www.statefulj.org/" rel="nofollow">http://www.statefulj.org/</a>). When I use @RequestParam with @Controller annotation it works but in @StatefulController I'm getting exception. According to the official demo(<a href="https://github.com/statefulj/statefulj-framework-demo-mongo/blob/master/src/main/java/org/statefulj/webapp/controller/UserController.java" rel="nofollow">https://github.com/statefulj/statefulj-framework-demo-mongo/blob/master/src/main/java/org/statefulj/webapp/controller/UserController.java</a>) this annotation should work in @StatefulController.</p>
  
  <p>I don't know what I'm doing wrong. Here is my code:</p>
  
  <pre><code>@StatefulController(
      clazz=Reservation.class,
      startState=Reservation.FREE,
      factoryId="reservationFactory")
  public class StatefulJController
  {
    public static final String HOMEPAGE_EVENT = "springmvc:/";
    public static final String RESERVE_EVENT = "springmvc:/reserve";
  
    @Transition(event=RESERVE_EVENT)
    public String startReservation(@RequestParam String quantity)
    {
      System.out.println(quantity);
      return "reserve";
    }
  }
  </code></pre>