斷點

          每天進步一點點!
          posts - 174, comments - 56, trackbacks - 0, articles - 21
          PCIS[2010-07-08 18:08:02,531]>>ERROR>> [BizControllerImpl異常堆棧{事務ID/用戶代碼}:[1278583679437325]/[00000210]:com.fwk.service.BusinessServiceException: com.fwk.dao.DaoException: 保存保單,saveOrUpdatePolicy()時出錯; nested exception is org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
           at com.pcis.policy.dm.PolicyDAO.saveOrUpdatePolicy(PolicyDAO.java:193)
           at com.pcis.policy.app.newbusiness.service.PolicyAppService.savePolicy(PolicyAppService.java:343)
           at com.pcis.policy.app.underwrite.bm.UnderwriteBM.submitUnderwrite(UnderwriteBM.java:139)
           at com.pcis.policy.app.underwrite.action.UnderwriteBizAction.submitUnderwrite(UnderwriteBizAction.java:548)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           ...
          Caused by: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
           at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:624)
           at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
           at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:379)
           at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:841)
           at com.fwk.dao.BaseDao.flush(Unknown Source)
           at com.pcis.policy.dm.PolicyDAO.saveOrUpdatePolicy(PolicyDAO.java:174)
           ... 80 more
          Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (PCISV6_TS.UI_PLY_CVRG) violated
           at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:602)
           at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9350)
           at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:210)
           at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
           at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
           at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
           ... 90 more

          分析及解決:
          在頁面保存的時候,后臺提示是違反唯一索引,通過UI_PLY_CVRG 查詢相應的表,
          select * from user_indexes  where index_name='UI_PLY_CVRG'
          該表是WEB_PLY_CVRG ,而該表的唯一索引UI_PLY_CVRG 是由該表的3個字段組成C_PLY_NO、N_EDR_PRJ_NO、 N_SEQ_NO,然后看下頁面發現是N_SEQ_NO有4個重復,刪除多余的記錄即可保存成功。

           

          主站蜘蛛池模板: 五峰| 格尔木市| 青龙| 剑阁县| 财经| 柏乡县| 昌平区| 张掖市| 镇安县| 汨罗市| 芦溪县| 静海县| 雅江县| 邓州市| 新晃| 龙游县| 灵山县| 宜兰市| 全南县| 铜梁县| 肥乡县| 潼南县| 昭觉县| 杂多县| 万年县| 肥城市| 禹州市| 自贡市| 崇左市| 江川县| 楚雄市| 沙坪坝区| 武邑县| 金平| 蒲江县| 德安县| 肃北| 靖西县| 溧水县| 天峻县| 新密市|