0
我收到以下異常Hibernate + Spring無法與會話
org.hibernate.util.JDBCExceptionReporter - SQL Error: 1, SQLState: 23000
org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (DBNAME.ConstraintName) violated
org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
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)
錯誤,指出在調用Session.flush()
同步數據庫狀態好心幫我
我使用彈簧webflow與休眠
你如何設置你的實體主鍵?你的@GeneratedValue註釋的值是多少? –
不,我是在hibernate config xmls中設置值,沒有註釋 – user1287569
好的,你怎麼指定你的密鑰,序列,標識符? –