J'ai un petit problème.
Il semble que toutes mise à jour et insertion utilisant des types String ou pas loin (type true_false par exemple) n'ont pas les ' nécessaires pour que la requete JDBC soit éxécutée.
Quelqu'un a-t-il déja rencontré ce problème.
Dans les elements ci après:
designation est de type string
isroot est de type true_false
Pour moi il manque les ' dans la requête
quand pensez-vous
NB: le preparedStatement du log. sql d'Hibernate semble pourtant correct
Hibernate version:
3.0
Full stack trace of any exception that occurs:
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:181)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at org.reunion.gui.odj.JODJTreeModel.initData(JODJTreeModel.java:47)
at org.reunion.gui.odj.JODJTreeModel.<init>(JODJTreeModel.java:28)
at org.reunion.gui.meeting.MeetingPanel.setJMeeting(MeetingPanel.java:251)
at org.reunion.gui.meeting.MeetingManagementFrame.setMeeting(MeetingManagementFrame.java:69)
at org.reunion.gui.NewSwingApp.initDataMeeting(NewSwingApp.java:184)
at org.reunion.gui.NewSwingApp.initGUI(NewSwingApp.java:162)
at org.reunion.gui.NewSwingApp.<init>(NewSwingApp.java:67)
at org.reunion.gui.NewSwingApp.main(NewSwingApp.java:61)
Caused by: java.sql.BatchUpdateException: L'élément du batch 0
insert into ordre_du_jour (id_ordre, designation, commentaire, estimated_duration, isRoot, contact_incharge, id_meeting, id_odj_pere, id_ordre_du_jour) values (0, Ordre du Jour, NULL, NULL, F, NULL, NULL, NULL, 39)
a été annulé. Appeler getNextException pour en connaître la cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2478)
at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:399)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1298)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:347)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2540)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:174)
... 13 more
Name and version of the database you are using:
The generated SQL (show_sql=true):
insert into ordre_du_jour (id_ordre, designation, commentaire, estimated_duration, isRoot, contact_incharge, id_meeting, id_odj_pere, id_ordre_du_jour) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
Merci de votre aide
|