Doing this cast causes the following exception to be thrown from Manage
Users:
org.springframework.web.util.NestedServletException: Request processing
failed; nested exception is java.lang.ClassCastException:
java.util.ArrayList cannot be cast to java.util.LinkedHashSet
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast
to java.util.LinkedHashSet
at
com.ism.ismid.webapp.controller.UserController.handleRequest(UserController.java:44)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
syg6 wrote:
>
> Yep. You're using Hibernate right? Just cast the List of Users to a
> LinkedHashSet in your UserController. List allows duplicates, Sets do not.
>
> Cheers,
> Bob
>
>
> George.Francis wrote:
>>
>> I'm getting some strange behaviour. I find that if I assign two Roles to
>> User 'admin' then when I call
>> userManager.getAll() I get two instances of the admin user in the List.
>> Has anyone else seen this kind of behaviour? What causes it?
>>
>
>
--
View this message in context:
http://www.nabble.com/Duplicate-Users-in-List-tf4699959s2369.html#a13475510
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]