This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JSF and the fly likes IllegalStateException: Client-id : ... is duplicated in the faces tree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "IllegalStateException: Client-id : ... is duplicated in the faces tree" Watch "IllegalStateException: Client-id : ... is duplicated in the faces tree" New topic
Author

IllegalStateException: Client-id : ... is duplicated in the faces tree

Roel Verwinkel
Greenhorn

Joined: Nov 23, 2009
Posts: 1
Hi,

I'm facing a problem using a datatable component. I can call the view twice without a problem, but the third time I get a IllegalStateException: Client-id : ... is duplicated in the faces tree. Before the exception occurs Hibernate shows a query for populating the datatable, so it's probably a rendering issue.

It's probably something stupid I'm overlooking, but I'm crushing my brains for some hours now on it. Any Ideas?

Kind regards,

Roel


Stacktrace:


JSF-view (stripped):


faces-config.xml:


UserListPageBean (removed getters/setters/imports):


The userDAO is injected by Spring:
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17039
    
  26

You get thus typically when updating a Faces view when the underlying JSF has been changed, so most commonly when you're tweaking stuff in development. Usually a complete page refresh will flush it out (meaning go to some other page, then request the offending page to be built from scratch, not via "back" or redisplay).

One thing that can help is to be generous when assigning id attributes on components. I've found that placing "id=" on forms and input controls is a general all-around boon.


An IDE is no substitute for an Intelligent Developer.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: IllegalStateException: Client-id : ... is duplicated in the faces tree
 
It's not a secret anymore!