Hi,
I recently switched containers from Tomcat to Resin and started to get this error.  
For the life of me I can not figure out what object is transient.  
Is there a way for hibernate to tell me which one its complaining about.
Here is the save method:
    public void save(BusinessObject bo) {
        try {
            sess = HibernateSession.currentSession();
            sess.saveOrUpdate(bo);
            sess.flush();
            sess.connection().commit();
        } catch (Exception e) {
            logger.error("Error Saving BO with ID == " + bo.getId(), e);
            throw new RuntimeException("Could not save");
        }finally{
            closeConnection();
        }
    }

Here is my stack trace:

2003-08-06 10:11:44,506 [tcpConnection-8080-0] ERROR com.esage.agility.DAO.hiber
nate.UserStoryDAOImpl -|- Error Saving BO with ID == 23
net.sf.hibernate.TransientObjectException: object references an unsaved transient 
instance - save the transient instance before flushing
        at net.sf.hibernate.impl.SessionImpl.getEntityIdentifierIfNotUnsaved(Ses
sionImpl.java:2319)
        at net.sf.hibernate.type.EntityType.getIdentifier(EntityType.java:54)
        at net.sf.hibernate.type.EntityType.isDirty(EntityType.java:113)
        at net.sf.hibernate.type.TypeFactory.findDirty(TypeFactory.java:204)
        at net.sf.hibernate.persister.AbstractEntityPersister.findDirty(Abstract
EntityPersister.java:202)
        at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2143
)
        at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:19
91)
        at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1978)
        at com.esage.agility.DAO.BaseDAO.save(BaseDAO.java:26)
        at com.esage.agility.DAO.hibernate.UserStoryDAOImpl.save(UserStoryDAOIm
l.java:42)
        at com.esage.agility.action.SaveCase.doExecute(SaveCase.java:36)


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to