ORA-14400: 插入的分区关键字未映射到任何分区

年底了,然后因为分区表被用完,没有新增分区导致出现该异常。当然这个是测试库出的问题。。

01-08 10:23:33 - Sender_2---->搬表失败:5239
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
        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:321)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
        at com.sunrise.sender.ReplySender.updateDB(ReplySender.java:218)
        at com.sunrise.sender.ReplySender.run(ReplySender.java:86)
Caused by: java.sql.BatchUpdateException: ORA-14400: 插入的分区关键字未映射到任何分区
        at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
        at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)

出现这个问题原因:分区表没有了。完了之后加了分区表。语句:

alter table SP_ORDER_REQ add partition  SP_ORDER_REQ201301 values less than(to_date('20130201000000','yyyymmddhh24miss')) tablespace ZHSP_NC;

完了之后没有问题了。可过了不久发现还有部分请求会出现这个错误。经查是因为改请求要入库时候的关键分区字段值是空的。这个报错,问题定位也就这么两个原因了。

 

你可能感兴趣的:(日常问题解决)