I am performing an update. When I review the log, I see no errors, but the database is not updated either. I am very confused and am not sure where to even begin to debug this. Any help would be greatly appreciated!
Hibernate version: 3.0
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.tiaa.dsvpassthrough.dao.DsvSupport"
table="DSVSUPPORT">
<composite-id name="key" class="org.tiaa.dsvpassthrough.dao.key.DsvSupportKey">
<key-property name="groupName"/>
<key-property name="keyName"/>
</composite-id>
<property name="keyValue"/>
<sql-insert>
INSERT INTO DSVSUPPORT (KEYVALUE, GROUPNAME, KEYNAME, UPDATETIME)
VALUES ( ?, ?, ?, sysdate )
</sql-insert>
</class>
<sql-query name="org.tiaa.dsvpassthrough.dao.DsvSupport">
<return alias="dsvSupport" class="org.tiaa.dsvpassthrough.dao.DsvSupport"/>
SELECT dsvSupport.GROUPNAME AS {dsvSupport.key.groupName},
dsvSupport.KEYNAME AS {dsvSupport.key.keyName},
dsvSupport.KEYVALUE AS {dsvSupport.keyValue}
FROM DSVSUPPORT dsvSupport
ORDER BY dsvSupport.GROUPNAME, dsvSupport.KEYNAME
</sql-query>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
public static void update(DspDao pdaoUpdate) throws DaoException
{
Session ssnDb = HibernateUtil.currentSession();
Transaction txDb = null;
try
{
txDb = ssnDb.beginTransaction();
ssnDb.update(pdaoUpdate);
txDb.commit();
} // end try
catch (HibernateException he)
{
if (null != txDb)
{
txDb.rollback();
} // end if
throw new DaoException("Database error during update.", he);
} // end catch
finally
{
HibernateUtil.closeSession();
} // end finally
} // end update
Full stack trace of any exception that occurs:
Name and version of the database you are using: Oracle 8i
The generated SQL (show_sql=true):
update DSVSUPPORT set keyValue=? where groupName=? and keyName=?
Debug level Hibernate log excerpt:
(2005-07-05 14:09:20,938), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.impl.SessionImpl, (081583022070510101456210001869), (opened session at timestamp: 4589924192002048)
(2005-07-05 14:09:20,938), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.transaction.JDBCTransaction, (081583022070510101456210001869), (begin)
(2005-07-05 14:09:20,953), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.ConnectionManager, (081583022070510101456210001869), (opening JDBC connection)
(2005-07-05 14:09:21,047), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.transaction.JDBCTransaction, (081583022070510101456210001869), (current autocommit status: true)
(2005-07-05 14:09:21,047), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.transaction.JDBCTransaction, (081583022070510101456210001869), (disabling autocommit)
(2005-07-05 14:09:21,047), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.DefaultSaveOrUpdateEventListener, (081583022070510101456210001869), (updating detached instance)
(2005-07-05 14:09:21,047), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.DefaultSaveOrUpdateEventListener, (081583022070510101456210001869), (updating [org.tiaa.dsvpassthrough.dao.DsvSupport#component[groupName,keyName]{keyName=kshkey, groupName=ksh}])
(2005-07-05 14:09:21,047), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.DefaultSaveOrUpdateEventListener, (081583022070510101456210001869), (updating [org.tiaa.dsvpassthrough.dao.DsvSupport#component[groupName,keyName]{keyName=kshkey, groupName=ksh}])
(2005-07-05 14:09:21,063), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.transaction.JDBCTransaction, (081583022070510101456210001869), (commit)
(2005-07-05 14:09:21,063), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.impl.SessionImpl, (081583022070510101456210001869), (automatically flushing session)
(2005-07-05 14:09:21,063), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (flushing session)
(2005-07-05 14:09:21,063), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (processing flush-time cascades)
(2005-07-05 14:09:21,063), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (dirty checking collections)
(2005-07-05 14:09:21,063), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (Flushing entities and processing referenced collections)
(2005-07-05 14:09:21,078), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.DefaultFlushEntityEventListener, (081583022070510101456210001869), (Updating entity: [org.tiaa.dsvpassthrough.dao.DsvSupport#component[groupName,keyName]{keyName=kshkey, groupName=ksh}])
(2005-07-05 14:09:21,078), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (Processing unreferenced collections)
(2005-07-05 14:09:21,078), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (Scheduling collection removes/(re)creates/updates)
(2005-07-05 14:09:21,078), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (Flushed: 0 insertions, 1 updates, 0 deletions to 1 objects)
(2005-07-05 14:09:21,078), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections)
(2005-07-05 14:09:21,094), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.pretty.Printer, (081583022070510101456210001869), (listing entities:)
(2005-07-05 14:09:21,094), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.pretty.Printer, (081583022070510101456210001869), (org.tiaa.dsvpassthrough.dao.DsvSupport{key=component[groupName,keyName]{keyName=kshkey, groupName=ksh}, keyValue=kshvalue new})
(2005-07-05 14:09:21,094), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (executing flush)
(2005-07-05 14:09:21,094), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.persister.entity.BasicEntityPersister, (081583022070510101456210001869), (Updating entity: [org.tiaa.dsvpassthrough.dao.DsvSupport#component[groupName,keyName]{keyName=kshkey, groupName=ksh}])
(2005-07-05 14:09:21,094), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.AbstractBatcher, (081583022070510101456210001869), (about to open PreparedStatement (open PreparedStatements: 0, globally: 0))
(2005-07-05 14:09:21,109), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.SQL, (081583022070510101456210001869), (update DSVSUPPORT set keyValue=? where groupName=? and keyName=?)
(2005-07-05 14:09:21,109), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.AbstractBatcher, (081583022070510101456210001869), (preparing statement)
(2005-07-05 14:09:21,109), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.persister.entity.BasicEntityPersister, (081583022070510101456210001869), (Dehydrating entity: [org.tiaa.dsvpassthrough.dao.DsvSupport#component[groupName,keyName]{keyName=kshkey, groupName=ksh}])
(2005-07-05 14:09:21,109), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.type.StringType, (081583022070510101456210001869), (binding 'kshvalue new' to parameter: 1)
(2005-07-05 14:09:21,109), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.type.StringType, (081583022070510101456210001869), (binding 'ksh' to parameter: 2)
(2005-07-05 14:09:21,125), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.type.StringType, (081583022070510101456210001869), (binding 'kshkey' to parameter: 3)
(2005-07-05 14:09:21,125), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.AbstractBatcher, (081583022070510101456210001869), (Adding to batch)
(2005-07-05 14:09:21,125), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.AbstractBatcher, (081583022070510101456210001869), (Executing batch size: 1)
(2005-07-05 14:09:21,172), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.AbstractBatcher, (081583022070510101456210001869), (success of batch update unknown: 0)
(2005-07-05 14:09:21,172), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.AbstractBatcher, (081583022070510101456210001869), (about to close PreparedStatement (open PreparedStatements: 1, globally: 1))
(2005-07-05 14:09:21,172), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.AbstractBatcher, (081583022070510101456210001869), (closing statement)
(2005-07-05 14:09:21,187), 66200-HOYINGK, c310-s2, dsp, DEBUG, hibernate.event.def.AbstractFlushingEventListener, (081583022070510101456210001869), (post flush)
(2005-07-05 14:09:21,187), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.JDBCContext, (081583022070510101456210001869), (before transaction completion)
(2005-07-05 14:09:21,187), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.impl.SessionImpl, (081583022070510101456210001869), (before transaction completion)
(2005-07-05 14:09:21,234), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.transaction.JDBCTransaction, (081583022070510101456210001869), (re-enabling autocommit)
(2005-07-05 14:09:21,234), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.transaction.JDBCTransaction, (081583022070510101456210001869), (committed JDBC Connection)
(2005-07-05 14:09:21,234), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.JDBCContext, (081583022070510101456210001869), (after transaction completion)
(2005-07-05 14:09:21,250), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.impl.SessionImpl, (081583022070510101456210001869), (after transaction completion)
(2005-07-05 14:09:21,250), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.impl.SessionImpl, (081583022070510101456210001869), (closing session)
(2005-07-05 14:09:21,250), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.ConnectionManager, (081583022070510101456210001869), (closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)])
(2005-07-05 14:09:21,250), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.jdbc.JDBCContext, (081583022070510101456210001869), (after transaction completion)
(2005-07-05 14:09:21,250), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibernate.impl.SessionImpl, (081583022070510101456210001869), (after transaction completion)
(2005-07-05 14:09:21,250), 66200-HOYINGK, c310-s2, dsp, DEBUG, org.hibe
|