Hibernate version:2.1.7
Mapping documents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping > <class name="ClientRisque" table="PSAC_TP_CLIENT_RISQUE" >
<id name="id" column="CRIS_NUM_ID" type="java.lang.Long" > <generator class="sequence"> <param name="sequence">PSAC_CPT_CLIENT_RISQUE</param> </generator> </id>
<property name="identification" type="java.util.Date" update="true" insert="true" column="CRIS_DAT_IDENTIF" length="7" not-null="false" />
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
if (!form.isBlankString(form.getDateIdentification())) { c.setIdentification(sdf.parse(form.getDateIdentification())); } else { c.setIdentification(null); } ...... this.clientRisqueDao.updateObject(c);
Full stack trace of any exception that occurs:
Spring stack : org.springframework.dao.DataIntegrityViolationException: (Hibernate operation): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: ORA-01401: inserted value too large for column
and hibernate stack : [29/06/05 11:01:45:438 CEST] 00000034 JDBCException W SQL Error: 1401, SQLState: 23000 [29/06/05 11:01:45:454 CEST] 00000034 JDBCException E ORA-01401: inserted value too large for column
[29/06/05 11:01:45:485 CEST] 00000034 JDBCException W SQL Error: 1401, SQLState: 23000 [29/06/05 11:01:45:500 CEST] 00000034 JDBCException E ORA-01401: inserted value too large for column
[29/06/05 11:01:45:532 CEST] 00000034 JDBCException W SQL Error: 1401, SQLState: 23000 [29/06/05 11:01:45:547 CEST] 00000034 JDBCException E ORA-01401: inserted value too large for column
[29/06/05 11:01:45:610 CEST] 00000034 JDBCException W SQL Error: 1401, SQLState: 23000 [29/06/05 11:01:45:625 CEST] 00000034 JDBCException E ORA-01401: inserted value too large for column
[29/06/05 11:01:45:641 CEST] 00000034 SessionImpl E Could not synchronize database state with session [29/06/05 11:01:45:672 CEST] 00000034 SQLErrorCodeS W Unable to translate SQLException with errorCode '1401', will now try the fallback translator [29/06/05 11:01:45:688 CEST] 00000034 SQLStateSQLEx I Translating SQLException with SQLState '23000' and errorCode '1401' and message [ORA-01401: inserted value too large for column ]; SQL was [] for task [Hibernate operation]
Name and version of the database you are using:oracle8i
The generated SQL (show_sql=true):
update PSAC_TP_CLIENT_RISQUE set CRIS_DAT_IDENTIF=?, CRIS_LIB_PRODUIT=?, CRIS_LIB_MOTIF=?, CRIS_NUM_CA=?, CRIS_LIB_COMMENTS=?, CRIS_DAT_ECHEANCE=?, CRIS_LIB_CLIERETENU=?, CRIS_ACTI_NUM_ID=?, CRIS_RRES_NUM_ID=?, CRIS_PROB_NUM_ID=?, CRIS_PACT_NUM_ID=?, CRIS_NUM_IDCR=?, CRIS_NUM_IDUPD=?, CRIS_DAT_DATCR=?, CRIS_DAT_DATUPD=? where CRIS_NUM_ID=?
Debug level Hibernate log excerpt:DEBUG
Hi everybody,
I'm currently using spring + hibernate in a project and I can't update an object. In fact, i can't update a particular property of this object.
The idea is when the user inputs something, i set the property, otherwise i want too set it too "null".
This doesn't seem to be correct as oracle throws an exception : value too large for column ....
I don't know how to deal with this pb because I use spring HibernateDaoSupport to update my objects .... I don't know if it set "null" java values to "null" database values ....
Thanks
|