2 Replies Latest reply on Jan 12, 2006 4:07 AM by coffee bean

    JavaServerFaces Sets cause exception

    coffee bean Newbie

      Hi
      I've have been receiving a Set (collection) of object from a hibernate DAO and displaying it using Faces. However, the following exception is thrown and apparently is due to using a Set.

      However, if this collection is changed to an implementation of ArrayList then the records are displayed to the page correctly.

      Has anyone experienced this and can give some advice?

      Thanks
      Glenn


      Exception :

      com.sun.facelets.tag.TagAttributeException: /C:/development/42508/apmweb/pages/client/client_notes_list.xhtml @70,53 tes
      t="${not empty note.attachments}" /C:/development/42508/apmweb/pages/client/client_notes_list.xhtml @70,53 test="${not e
      mpty note.attachments}": Bean: org.hibernate.collection.PersistentSortedSet, property: 0
      at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:235)
      at com.sun.facelets.tag.TagAttribute.getBoolean(TagAttribute.java:79)
      at com.sun.facelets.tag.jstl.core.IfHandler.apply(IfHandler.java:49)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.tag.jstl.core.ForEachHandler.apply(ForEachHandler.java:168)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:147)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:147)
      at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:147)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:94)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
      at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:400)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:434)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:214)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:120)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3020)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1925)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1848)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1288)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
      Caused by: javax.el.PropertyNotFoundException: /C:/development/42508/apmweb/pages/client/client_notes_list.xhtml @70,53
      test="${not empty note.attachments}": Bean: org.hibernate.collection.PersistentSortedSet, property: 0
      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
      at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:233)
      ... 34 more
      10/01/2006 16:14:29 com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Took Type: java.io.PrintWriter