2 Replies Latest reply on May 11, 2007 6:48 PM by Tony Mai

    Seam EL Exception: Argument type mismatch

    Tony Mai Apprentice

      Hello,

      I ran into a "" exception using Seam's EL in a JSF page. It seems that the parameter passed into the method was not parsed correctly. I'd tried int, Integer, and String and all arrived at the same exception.

      The following are the codes:

      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("orderMgr")
      public class PendingOrdersManagerBean implements PendingOrdersManager, Serializable {
      ...
      
       public void refreshPendingOrders(int size) {
       ...
       }
      }


      My JSF page calls the code as followed:

      <s:link value="Refresh" action="#{orderMgr.refreshPendingOrders(5)}" />
      


      Seam threw an exception like this:
      19:23:24,375 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalArgumentException: argument type mismatch
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
      at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:71)
      at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
      at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
      at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:148)
      at org.jboss.seam.core.Pages.callAction(Pages.java:499)
      at org.jboss.seam.core.Pages.enterPage(Pages.java:282)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276)
      ...


      Am I doing something wrong or not conventional? Any suggestion?

      Thanks.
      -tony