斷點

          每天進步一點點!
          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個重復,刪除多余的記錄即可保存成功。

           

          主站蜘蛛池模板: 子长县| 沾益县| 林州市| 城固县| 山丹县| 蒙山县| 当阳市| 博湖县| 奉节县| 南皮县| 宁陵县| 白银市| 海淀区| 鹿邑县| 吉隆县| 襄垣县| 无锡市| 新丰县| 简阳市| 东丰县| 拜泉县| 三都| 洮南市| 康乐县| 青铜峡市| 临汾市| 保亭| 万年县| 兴安盟| 孝义市| 壤塘县| 万州区| 南投市| 泸溪县| 东宁县| 雷波县| 尼玛县| 浑源县| 上饶县| 广水市| 惠州市|