1 Reply Latest reply on Nov 29, 2008 4:45 AM by estevaofreitas

    Problems with <s:convertEntity>

    estevaofreitas

      Hello to all, I use Seam since version 1.2.1 and I'm very glad seeing how is Seam growing and getting stable. However I'm using Seam 2.1.0.SP1 and I'm getting problems in using Seam with Hibernate and s:convertEntity.
      I just use add the following line described in docs: <ui:hibernate-entity-loader session="#{bookingDatabase}" />


      Everithing starts right, but when one page with s:convertEntity is called this exception is lauched:


      org.hibernate.TransientObjectException: The instance was not associated with this session
           at org.hibernate.impl.SessionImpl.getIdentifier(SessionImpl.java:1375)
           at org.jboss.seam.persistence.HibernateSessionProxy.getIdentifier(HibernateSessionProxy.java:236)
           at org.jboss.seam.framework.HibernateEntityIdentifier.<init>(HibernateEntityIdentifier.java:13)
           at org.jboss.seam.ui.HibernateEntityLoader.createIdentifier(HibernateEntityLoader.java:28)
           at org.jboss.seam.ui.AbstractEntityLoader.put(AbstractEntityLoader.java:46)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


      For now I'm using s:convertEntity with and JPA and delegate method and it's working fine.
      I think I'm just doing something wrong, and I hope something can help me. And congratulations to all, you are doing a very good work