3 Replies Latest reply on Aug 29, 2008 7:25 AM by Brian Hiles

    Error when trying to get data from associated object

    Brian Hiles Newbie

      I'm having some problems with my program. I'm relativly new to Seam, but I have been looking for an answer to this problem for about a week now through this site and various others and am still stuck.


      My environment is as follows:
      Windows XP
      Eclipse 3.3.2
      JDK 5.10
      JBossTools 2.1.2 GA
      Seam 2.0.2 SP1
      JBossAS 4.2.2 GA


      I've attached what I think is reivant code below. The basic code was produced by the JBoss Tools Let me know if you need to see somthing else. The flow I go through is creating a Line and saving it. Create a Series, associate it to a Line and save it. All is good at this point and the database is updated correctly upon visual validation.


      Here's where the problem happens. At this point any attempt to get the details of a Line results in an error.


      Error listing for a Line detail is:


      21:11:37,234 INFO  [STDOUT] Hibernate: 
          select
              line0_.id as id7_0_,
              line0_1_.name as name7_0_,
              line0_1_.version as version7_0_,
              line0_1_.added as added7_0_ 
          from
              line line0_ 
          inner join
              item line0_1_ 
                  on line0_.id=line0_1_.id 
          where
              line0_.id=?
      21:11:37,250 INFO  [STDOUT] Hibernate: 
          select
              series0_.line_id as line2_1_,
              series0_.id as id1_,
              series0_.id as id7_0_,
              series0_1_.name as name7_0_,
              series0_1_.version as version7_0_,
              series0_1_.added as added7_0_,
              series0_.line_id as line2_16_0_ 
          from
              series series0_ 
          inner join
              item series0_1_ 
                  on series0_.id=series0_1_.id 
          where
              series0_.line_id=?
      21:11:37,250 INFO  [STDOUT] 21:11:37,250 ERROR [LazyInitializationException] illegal access to loading collection
      org.hibernate.LazyInitializationException: illegal access to loading collection
           at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:341)
           at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
           at org.hibernate.collection.PersistentSet.hashCode(PersistentSet.java:411)
           at com.toyfiles.model.Line.hashCode(Line.java:27)
           at com.toyfiles.model.Series.hashCode(Series.java:22)
           at java.util.HashMap.put(HashMap.java:418)
           at java.util.HashSet.add(HashSet.java:194)
           at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
           at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:329)
           at org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:237)
           at org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:222)
           at org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:195)
           at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:877)
           at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:865)
           at org.hibernate.loader.Loader.doQuery(Loader.java:729)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
           at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
           at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
           at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
           at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
           at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
           at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
           at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
           at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
           at org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:146)
           at org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:37)
           at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
           at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
           at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
           at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
           at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
      21:11:37,250 ERROR [STDERR] Aug 18, 2008 9:11:37 PM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/Line.xhtml]
      org.hibernate.LazyInitializationException: illegal access to loading collection
           at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:341)
           at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
           at org.hibernate.collection.PersistentSet.hashCode(PersistentSet.java:411)
           at com.toyfiles.model.Line.hashCode(Line.java:27)
           at com.toyfiles.model.Series.hashCode(Series.java:22)
           at java.util.HashMap.put(HashMap.java:418)
           at java.util.HashSet.add(HashSet.java:194)
           at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
           at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:329)
           at org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:237)
           at org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:222)
           at org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:195)
           at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:877)
           at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:865)
           at org.hibernate.loader.Loader.doQuery(Loader.java:729)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
           at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
           at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
           at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
           at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
           at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
           at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
           at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
           at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
           at org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:146)
           at org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:37)
           at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
           at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
           at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
           at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
           at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
      21:11:37,281 INFO  [STDOUT] 21:11:37,281 ERROR [LazyInitializationException] illegal access to loading collection
      org.hibernate.LazyInitializationException: illegal access to loading collection
           at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:341)
           at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
           at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
           at org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:146)
           at org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:37)
           at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
           at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
           at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
           at sun.reflect.GeneratedMethodAccessor194.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at com.sun.facelets.util.DevTools.writeAttributes(DevTools.java:243)
           at com.sun.facelets.util.DevTools.writeStart(DevTools.java:287)
           at com.sun.facelets.util.DevTools.writeComponent(DevTools.java:192)
           at com.sun.facelets.util.DevTools.writeComponent(DevTools.java:210)
           at com.sun.facelets.util.DevTools.writeComponent(DevTools.java:210)
           at com.sun.facelets.util.DevTools.debugHtml(DevTools.java:107)
           at com.sun.facelets.FaceletViewHandler.handleRenderException(FaceletViewHandler.java:692)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:660)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
      21:11:37,296 INFO  [STDOUT] 21:11:37,296 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@1f37bf1<rs=org.hsqldb.jdbc.jdbcResultSet@1e4a61a>





      Here's the goods (code):


      Item:



      package com.test.model;
      
      import java.io.Serializable;
      import java.util.Date;
      
      import javax.persistence.Column;
      import javax.persistence.Entity;
      import javax.persistence.GeneratedValue;
      import javax.persistence.GenerationType;
      import javax.persistence.Id;
      import javax.persistence.Inheritance;
      import javax.persistence.InheritanceType;
      import javax.persistence.Table;
      import javax.persistence.Temporal;
      import javax.persistence.TemporalType;
      import javax.persistence.Version;
      
      import org.hibernate.validator.NotEmpty;
      
      @Entity
      @Table(name="item")
      @Inheritance(strategy=InheritanceType.JOINED)
      public class Item implements Serializable{
           
           private static final long serialVersionUID = 223417623862831068L;
           private long id;
           private String name;
           private long version;
           private Date added = new Date();
                
           @Override
           public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + ((added == null) ? 0 : added.hashCode());
                result = prime * result + (int) (id ^ (id >>> 32));
                result = prime * result + ((name == null) ? 0 : name.hashCode());
                result = prime * result + (int) (version ^ (version >>> 32));
                return result;
           }
           
           @Override
           public boolean equals(Object obj) {
                if (this == obj)
                     return true;
                if (obj == null)
                     return false;
                if (getClass() != obj.getClass())
                     return false;
                final Item other = (Item) obj;
                if (added == null) {
                     if (other.added != null)
                          return false;
                } else if (!added.equals(other.added))
                     return false;
                if (id != other.id)
                     return false;
                if (name == null) {
                     if (other.name != null)
                          return false;
                } else if (!name.equals(other.name))
                     return false;
                if (version != other.version)
                     return false;
                return true;
           }
           
           @Id
           @GeneratedValue(strategy=GenerationType.AUTO)
           public long getId() {
                return id;
           }
           public void setId(long id) {
                this.id = id;
           }
           
           @NotEmpty
           public String getName() {
                return name;
           }
           public void setName(String name) {
                this.name = name;
           }
                
           @Version
           protected long getVersion() {
                return version;
           }
           protected void setVersion(long version) {
                this.version = version;
           }
           
           @Temporal(TemporalType.DATE)
           @Column(updatable = false)
           public Date getAdded() {
                return added;
           }
           public void setAdded(Date added) {
                this.added = added;
           }
      }





      Line



      package com.test.model;
      
      import java.io.Serializable;
      import java.util.HashSet;
      import java.util.Set;
      
      import javax.persistence.Entity;
      import javax.persistence.OneToMany;
      import javax.persistence.Table;
      
      @Entity
      @Table(name="line")
      public class Line extends Item implements Serializable {
           private static final long serialVersionUID = 8178882609670117602L;
           private Set<Series> series = new HashSet<Series> ();
      
          @Override
           public int hashCode() {
                final int prime = 31;
                int result = super.hashCode();
                result = prime * result + ((series == null) ? 0 : series.hashCode());
                return result;
           }
          
           @Override
           public boolean equals(Object obj) {
                if (this == obj)
                     return true;
                if (!super.equals(obj))
                     return false;
                if (getClass() != obj.getClass())
                     return false;
                final Line other = (Line) obj;
                if (series == null) {
                     if (other.series != null)
                          return false;
                } else if (!series.equals(other.series))
                     return false;
                return true;
           }
           
           @OneToMany(mappedBy="line")
           public Set<Series> getSeries() {
                return series;
           }
           public void setSeries(Set<Series> series) {
                this.series = series;
           }
      }






      Series



      package com.test.model;
      
      import java.io.Serializable;
      import java.util.Set;
      
      import javax.persistence.Entity;
      import javax.persistence.ManyToOne;
      import javax.persistence.OneToMany;
      import javax.persistence.Table;
      
      @Entity
      @Table(name="series")
      public class Series extends Item implements Serializable{
           private static final long serialVersionUID = -6514291332253816400L;
           private Line line;
           private Set<Package> packages;
           
           @Override
           public int hashCode() {
                final int prime = 31;
                int result = super.hashCode();
                result = prime * result + ((line == null) ? 0 : line.hashCode());
                result = prime * result
                          + ((packages == null) ? 0 : packages.hashCode());
                return result;
           }
           
           @Override
           public boolean equals(Object obj) {
                if (this == obj)
                     return true;
                if (!super.equals(obj))
                     return false;
                if (getClass() != obj.getClass())
                     return false;
                final Series other = (Series) obj;
                if (line == null) {
                     if (other.line != null)
                          return false;
                } else if (!line.equals(other.line))
                     return false;
                if (packages == null) {
                     if (other.packages != null)
                          return false;
                } else if (!packages.equals(other.packages))
                     return false;
                return true;
           }
           
           @ManyToOne
           public Line getLine() {
                return line;
           }
           public void setLine(Line line) {
                this.line = line;
           }
           
           @OneToMany
           public Set<Package> getPackages() {
                return packages;
           }
           public void setPackages(Set<Package> packages) {
                this.packages = packages;
           }     
      }
      
      Line.xhtml
      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                                   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                      xmlns:s="http://jboss.com/products/seam/taglib"
                      xmlns:ui="http://java.sun.com/jsf/facelets"
                      xmlns:f="http://java.sun.com/jsf/core"
                      xmlns:h="http://java.sun.com/jsf/html"
                      xmlns:rich="http://richfaces.org/rich"
                      template="layout/template.xhtml">
                             
      <ui:define name="body">
          
          <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
          
          <h:outputText value="#{lineHome.instance.name}"/>
              
          <div class="actionButtons">      
              <s:button view="/LineEdit.xhtml" 
                          id="edit" 
                       value="Edit"/>
          </div>
          
           <rich:panel>
                <div>
                     <h:outputText value="There are no series defined for this line"
                          rendered="#{empty lineHome.instance.series}" /> 
           <!--                
                     <rich:dataList var="series" value="#lineHome.instance.series}" rendered="#{not empty lineHome.instance.series}">
      
                          <s:link view="/Series.xhtml" id="viewseries" value="#{seriesHome.instance.name}" 
                               propagation="none">
                               <f:param name="seriesId" value="#{seriesHome.instance.id}" />
                          </s:link>
      
                     </rich:dataList>
            -->
                </div>
           </rich:panel>   
          
      
      
      </ui:define>
      
      </ui:composition>





      LineHome


      package com.test.session;
      
      import com.test.model.*;
      
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.framework.EntityHome;
      
      @Name("lineHome")
      public class LineHome extends EntityHome<Line> {
      
           private static final long serialVersionUID = 7657649358763674325L;
           @In(create = true)
           SeriesHome seriesHome;
           
           public void setLineId(Long id) {
                setId(id);
           }
      
           public Long getLineId() {
                return (Long) getId();
           }
      
           @Override
           protected Line createInstance() {
                Line line = new Line();
                return line;
           }
      
           public void wire() {
                getInstance();
           }
      
           public boolean isWired() {
                return true;
           }
      
           public Line getDefinedInstance() {
                return isIdDefined() ? getInstance() : null;
           }
      
      }




      SeriesHome


      package com.toyfiles.session;
      
      import com.toyfiles.model.*;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.framework.EntityHome;
      
      @Name("seriesHome")
      public class SeriesHome extends EntityHome<Series> {
      
           private static final long serialVersionUID = -8000742707833168396L;
           @In(create = true)
           LineHome lineHome;
      
           public void setSeriesId(Long id) {
                setId(id);
           }
      
           public Long getSeriesId() {
                return (Long) getId();
           }
      
           @Override
           protected Series createInstance() {
                Series series = new Series();
                return series;
           }
      
           public void wire() {
                getInstance();
                Line line = lineHome.getDefinedInstance();
                if (line != null) {
                     getInstance().setLine(line);
                }
           }
      
           public boolean isWired() {
                return true;
           }
      
           public Series getDefinedInstance() {
                return isIdDefined() ? getInstance() : null;
           }
      
      }





      Thanks in advance for your help!


      Brian