I'm still stuck on this. At this point, all of my loads on this Authorization object have this error. I have commented out all of the joins on the mapping. At this point, it looks like this:
Code:
<class name="Authorization" table="AUTHORIZATION">
<id name="id" type="java.lang.Long">
<column name="AUTH_ID" precision="18" scale="0" />
<generator class="identity" />
</id>
<property name="authName" type="string" column="AUTH_NAME" />
<property name="description" type="string" column="DESCRIPTION" />
<property name="createDate" type="timestamp" column="CREATE_DATE" update="false" />
<property name="createUser" type="string" column="CREATE_USER" update="false" />
<property name="lastUpdate" type="timestamp" column="LAST_UPDATE" />
<property name="lastUpdateUser" type="string" column="LAST_UPDATE_USER" />
</class>
It is still a problem. Here's the stack trace. As you can see, it actually loads the data and then rather than quitting, it seems to find the collection of results dirty & find that it needs updating. At no point do I do any kind of update. I'm getting a little desperate with this one...does *anyone* have any ideas of something I could look at?
Code:
11:34:54,191 DEBUG DefaultListableBeanFactory:214 - Returning cached instance of singleton bean '/auth'
11:34:54,258 DEBUG SessionFactoryUtils:318 - Opening Hibernate Session
11:34:54,351 DEBUG SessionImpl:247 - opened session at timestamp: 12521684942
11:34:54,381 DEBUG AbstractBatcher:410 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:34:54,382 DEBUG ConnectionManager:444 - opening JDBC connection
11:34:54,389 DEBUG SQL:111 -
/* criteria query */ select
this_.AUTH_ID as AUTH1_7_0_,
this_.AUTH_NAME as AUTH2_7_0_,
this_.DESCRIPTION as DESCRIPT3_7_0_,
this_.CREATE_DATE as CREATE4_7_0_,
this_.CREATE_USER as CREATE5_7_0_,
this_.LAST_UPDATE as LAST6_7_0_,
this_.LAST_UPDATE_USER as LAST7_7_0_
from
AUTHORIZATION this_
Hibernate:
/* criteria query */ select
this_.AUTH_ID as AUTH1_7_0_,
this_.AUTH_NAME as AUTH2_7_0_,
this_.DESCRIPTION as DESCRIPT3_7_0_,
this_.CREATE_DATE as CREATE4_7_0_,
this_.CREATE_USER as CREATE5_7_0_,
this_.LAST_UPDATE as LAST6_7_0_,
this_.LAST_UPDATE_USER as LAST7_7_0_
from
AUTHORIZATION this_
11:34:54,421 DEBUG AbstractBatcher:426 - about to open ResultSet (open ResultSets: 0, globally: 0)
11:34:54,424 DEBUG Loader:1197 - result row: EntityKey[com.gtsyn.security.bean.Authorization#1]
11:34:54,451 DEBUG AbstractBatcher:433 - about to close ResultSet (open ResultSets: 1, globally: 1)
11:34:54,451 DEBUG AbstractBatcher:418 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:34:54,454 DEBUG TwoPhaseLoad:130 - resolving associations for [com.gtsyn.security.bean.Authorization#1]
11:34:54,458 DEBUG TwoPhaseLoad:226 - done materializing entity [com.gtsyn.security.bean.Authorization#1]
11:34:54,458 DEBUG StatefulPersistenceContext:860 - initializing non-lazy collections
11:34:54,461 DEBUG DistinctResultTransformer:96 - transformed: 1 rows to: 1 distinct results
11:34:54,461 DEBUG ConnectionManager:325 - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
11:34:54,464 DEBUG HibernateTemplate:389 - Eagerly flushing Hibernate session
11:34:54,473 DEBUG AbstractFlushingEventListener:134 - processing flush-time cascades
11:34:54,476 DEBUG AbstractFlushingEventListener:177 - dirty checking collections
11:34:54,485 DEBUG AbstractFlushingEventListener:108 - Flushed: 0 insertions, 1 updates, 0 deletions to 1 objects
11:34:54,486 DEBUG AbstractFlushingEventListener:114 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
11:34:54,488 DEBUG Printer:106 - listing entities:
11:34:54,488 DEBUG Printer:113 - com.gtsyn.security.bean.Authorization{id=1, createUser=travep, lastUpdate=2009-08-27 22:31:05, description=Admin role for security application, authName=null, lastUpdateUser=travep, createDate=2009-08-27 22:31:05}
11:34:54,495 DEBUG AbstractBatcher:410 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:34:54,496 DEBUG SQL:111 -
/* update
com.gtsyn.security.bean.Authorization */ update
AUTHORIZATION
set
AUTH_NAME=?,
DESCRIPTION=?,
LAST_UPDATE=?,
LAST_UPDATE_USER=?
where
AUTH_ID=?
Hibernate:
/* update
com.gtsyn.security.bean.Authorization */ update
AUTHORIZATION
set
AUTH_NAME=?,
DESCRIPTION=?,
LAST_UPDATE=?,
LAST_UPDATE_USER=?
where
AUTH_ID=?
11:34:54,510 DEBUG AbstractBatcher:66 - Executing batch size: 1
11:34:54,531 DEBUG AbstractBatcher:418 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:34:54,537 DEBUG JDBCExceptionReporter:92 - Could not execute JDBC batch update [/* update com.gtsyn.security.bean.Authorization */ update AUTHORIZATION set AUTH_NAME=?, DESCRIPTION=?, LAST_UPDATE=?, LAST_UPDATE_USER=? where AUTH_ID=?]
java.sql.BatchUpdateException: Column 'auth_name' cannot be null
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1693)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1108)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)