[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2797) Insert using JDBC preparedSatement and MySQL
jelencik chantal (JIRA)
noreply at atlassian.com
Mon Aug 20 07:57:13 EDT 2007
Insert using JDBC preparedSatement and MySQL
--------------------------------------------
Key: HHH-2797
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2797
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.1
Environment: Hibernate release 3.2.1 with MYSQL 5.1 on linux platform
Reporter: jelencik chantal
Priority: Critical
Attachments: HibernateUtil.zip
I have the following problem when i try to insert data in MySQL database using hibernate persist() :
[DEBUG SQL]
insert
into
FACTURE
(DATE_FACTURE, DESCRIPTION, numero)
values
(?, ?, ?) [13:37:09.812] org.hibernate.jdbc.AbstractBatcher.log(AbstractBatcher.java:393)
[DEBUG DateType] binding '20 août 2007' to parameter: 1 [13:37:09.828] org.hibernate.type.NullableType.nullSafeSet(NullableType.java:80)
[DEBUG StringType] binding 'Facture B identifiée par 004' to parameter: 2 [13:37:09.843] org.hibernate.type.NullableType.nullSafeSet(NullableType.java:80)
[DEBUG StringType] binding '004' to parameter: 3 [13:37:09.843] org.hibernate.type.NullableType.nullSafeSet(NullableType.java:80)
Exception in thread "main" org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 7810893; expected: 1
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:71)
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at fr.mipih.commun.dao.HibernateFactureDao.store(HibernateFactureDao.java:194)
at fr.mipih.commun.services.ServiceFacture.populateFactures(ServiceFacture.java:124)
at fr.mipih.commun.Partie2.main(Partie2.java:22)
See mapping file in attachement.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list