users@glassfish.java.net

Re: JSF - Glassfish V1 UR1 java.util.Arrays$ArrayList problem

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 08 Nov 2006 09:48:54 -0800

Drinkwater, GJ (Glen) wrote:
>
> Hi
>
> I recently upgraded to Glassfish V1 UR1 from V1 b48 and my application
> seems to have stopped working.
>
> I get this error
>
> [#|2006-11-08T15:44:39.857+0000|INFO|sun-appserver-pe9.0|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=15;_ThreadName=httpWorkerThread-8080-1;
> sourceId=body:autofillform:facilities[severity=(ERROR 2),
> summary=(Can't set property 'currentSelectedFacilities' on class
> 'uk.ac.dl.dp.web.backingbeans.VisitData' to value '[EMAT]'.),
> detail=(Can't set property 'currentSelectedFacilities' on class
> 'uk.ac.dl.dp.web.backingbeans.VisitData' to value
> '[EMAT]'.)];|WARNING: FacesMessage(s) have been enqueued, but may not
> have been displayed.
>
> Having looked into the problem i can see that the JSF application is
> trying to set the value of a h:selectManyListbox
> value="#{visit.visitData.currentSelectedFacilities}" ... to a
> java.util.Arrays$ArrayList and not a java.util.ArrayList as it did in b48.
>
> Has anyone had the same problem or knows what i am doing wrong.
>
> Thanks
>
What is your setter for the currectSelectedFacilities property
expecting? java.util.List,
or java.util.ArrayList?

If it's the latter, you should change it to java.util.List and not rely
on the implementation
always setting a specific type.