ArrayStoreException with Ajax4JSF and JBoss Seam
3:48 PM, Fri, Jul 27 2007
I used Seam-gen 1.2.1 to create an application framework to deploy in JBoss 4.2.1. Everything was default, but the app didn't work. I got this error when using a Richfaces component:
Caused by: java.lang.ArrayStoreException: org.apache.commons.collections.UnboundedFifoBuffer at org.ajax4jsf.framework.ajax.AjaxViewRoot.clearEvents(AjaxViewRoot.java:243) at org.ajax4jsf.framework.ajax.AjaxViewRoot.getEvents(AjaxViewRoot.java:223) at org.ajax4jsf.framework.ajax.AjaxViewRoot.getEventsQueue(AjaxViewRoot.java:215)
The fix is simple. Replace the
ajax4jsf-1.1.1-SNAPSHOT.jar file that was placed by Seam-gen with the
ajax4jsf-1.1.1.jar downloaded from JBoss Labs. Also replace the Jakarta Commons Beanutils which comes with Seam-gen with an older version. Seam-gen provides
commons-beanutils-1.7.0.jar, which doesn't work with the provided Ajax4JSF. Replace that Beanutils jar with the older Beanutils 1.6, which can be downloaded from the Jakarta Commons Beanutils site. Look for the archive of older releases.
There is a bug filed on this. Upcoming releases won't have this problem.