[JBoss Seam] - Seam EL Exception: Argument type mismatch
by tonylmai
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:
anonymous wrote : 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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044866#4044866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044866
19 years, 1 month
[JBoss Seam] - No phase id bound to current thread (make sure you ...
by jgreene
Hello -
Is anyone aware if there is a well-defined solution to this problem yet? There are a few threads on this forum, but it seems like no one knows for sure why this happens. I've got a sample app that was working at work. I brought it home, added a few database tables and a couple of beans. I did not touch the xml config files significantly, except where I had to because of a package name change. Now I'm getting this problem when I try to load the main page. The now famous error reads:
java.lang.IllegalStateException: No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)
The error occurs right after:
[Lifecycle] starting up: org.jboss.seam.security.identity
Most complaints seem to be from people like me who do not have more than one SeamPhaseListener installed. And I've seen this referred to as a probable Seam bug. This problem is particularly confusing to me because I started with basically the same app that was running, and now, after adding a couple db tables and beans, this error occurs.
BTW, I'm running in Tomcat.
Anyone have any ideas? Any help would be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044865#4044865
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044865
19 years, 1 month
[JBoss Seam] - @Factory usage
by tonylmai
Hello,
Borrowed the concept from example "message", I implemented the following Seam component:
@Stateful
| @Scope(ScopeType.SESSION)
| @Name("orderMgr")
| public class PendingOrdersManagerBean implements PendingOrdersManager, Serializable {
| private static final long serialVersionUID = 1L;
|
| @DataModel
| private List<TdOrderInfo> workingOrders;
|
| @DataModelSelection
| @Out(required=false)
| private TdOrderInfo orderInfo;
|
| @Factory("workingOrders")
| @Observer("newOrder")
| public void getPendingOrders() {
| ...
| }
And
@Name("orderInfo")
| @Scope(ScopeType.EVENT)
| public class TdOrderInfo implements Serializable {
| private static final long serialVersionUID = 1L;
| private OrderInfo orderInfo = null;
| private String lockOwner = null;
|
| public TdOrderInfo() {}
| ...
| }
However, the method that is marked with @Factory was never called.
What am I missing here?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044856#4044856
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044856
19 years, 1 month