日期:2014-05-17  浏览次数:20927 次

严重: ORA-00001: 违反唯一约束条件
插入数据的时候报的这个问题,大家给看看。

Hibernate: 
    select
        hibernate_sequence.nextval 
    from
        dual
Hibernate: 
    insert 
    into
        MAP_T_RELAY_STATION
        (DATA_GUID, RELAY_STATION_NAME, X, Y, RELAY_STATION_ID) 
    values
        (?, ?, ?, ?, ?)
2011-5-4 9:21:48 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1, SQLState: 23000
2011-5-4 9:21:48 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: ORA-00001: 违反唯一约束条件 (JMJL.MAP_T_RELAY_STATION_KEY)

2011-5-4 9:21:48 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1, SQLState: 23000
2011-5-4 9:21:48 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: ORA-00001: 违反唯一约束条件 (JMJL.MAP_T_RELAY_STATION_KEY)

2011-5-4 9:21:48 org.hibernate.event.def.AbstractFlushingEventListener performExecutions
严重: 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:249)
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 org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy0.saveRelayStation(Unknown Source)
at&nb