Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JspException: Component ID has already been used in the view

843844Jun 19 2007 — edited Oct 28 2007
Hello,
We're developing a large JSF-based app with custom .tag on glassfishV1/AS9.0.1 and our team is having an extremely hard time dealing with JspException: Component ID has already been used in the view.
They seem to pop-up randomly and even if we go through the trouble of setting an id for every single JSF component on that page, sometimes we still get this error...

#|2007-06-18T12:32:11.964-0700|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpWorkerThread-8181-0;_RequestID=fd866d2a-2e39-42d5-b5eb-8ebd9e0de0fb;|ApplicationDispatcher.log: ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Component ID 'moduleinviteFriends' has already been used in the view.
See below for the view up to the point of the detected error.
+id: j_id_id11
type: javax.faces.component.UIViewRoot@141c44d
+id: j_id0
type: javax.faces.component.html.HtmlOutputText@bedc80
+id: javascriptInclude
type: javax.faces.component.UINamingContainer@7e7394
+id: j_id1
type: javax.faces.component.html.HtmlOutputText@1d6105e

Sometimes, if we remove all ids then the error goes away... Other times, just playing around with adding/removing comments can make the error come or go away! It's very unpredictable and often jeopardize our schedules as it can take many hours to fix just one of those.

I was wondering if it's a pain many JSF developers go through or if we do something specific to deserve that.
Is anyone struggling with those errors too?
Are there best practices on how to avoid and/or fix those?
Thank you,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2007
Added on Jun 19 2007
4 comments
841 views