主键冲突

系统报错

主键冲突异常 
详细信息 
[command]= (command ownerId="13541523" ownerName="core" poolName="core" startTime="2015-02-17 09:51:59.010" endTime="1970-01-01 08:00:00.000" cost="-1424137919010" correlation="0" beanClass="ep.boimpl.bssr.arcgp.OGPMeterImpl" beanMethod="put") (statement)(![CDATA[insert into C_METER(CONS_MT_ID, METER_ID, INST_LOC, INST_DATE, T_FACTOR, REF_METER_FLAG, REF_METER_ID, VALIDATE_CODE, MODULE_NO, ORG_NO, MR_FACTOR, LAST_CHK_DATE, ROTATE_CYCLE, ROTATE_VALID_DATE, SIM_CARD_NO, CHK_CYCLE, BIN_MT_POS, MADE_NO, ASSET_NO, BAR_CODE, COMM_ADDR1, COMM_ADDR2, COMM_NO, BAUDRATE, COMM_MODE, ATTACHEQUIP_TYPE_CODE, METER_KIND) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]])(/statement) (parameters) (parameter index="1") (value type="java.math.BigDecimal")(![CDATA[29199345]])(/value) (value type="java.math.BigDecimal")(![CDATA[8000000007226265]])(/value) (value type="java.lang.String")(![CDATA[电表箱内]])(/value) (value type="java.sql.Timestamp")(![CDATA[2015-02-16 15:16:56.0]])(/value) (value type="java.math.BigDecimal")(![CDATA[1]])(/value) (value type="java.lang.String")(![CDATA[0]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="java.lang.String")(![CDATA[3645514]])(/value) (value type="java.lang.String")(![CDATA[1]])(/value) (value type="java.sql.Timestamp")(![CDATA[2015-02-16 15:16:56.0]])(/value) (value type="java.math.BigDecimal")(![CDATA[120]])(/value) (value type="java.sql.Timestamp")(![CDATA[2025-02-16 15:16:56.0]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="java.lang.String")(![CDATA[140000051158]])(/value) (value type="java.lang.String")(![CDATA[3630001181400000511587]])(/value) (value type="java.lang.String")(![CDATA[3630001181400000511587]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="java.lang.String")(![CDATA[01]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (value type="{unknown}")(![CDATA[{null}]])(/value) (/parameter) (/parameters) (/command) [transaction]= (TransactionStatus id="25468198" beginPersistence="false" beginTransaction="false" rollbackOnly="true" hasPersistence="false") (Persistence id="13541523"/) (TransactionDefinition propagation="REQUIRED" method="ep.boimpl.bssr.arcgp.OGPMeterImpl.put" pool="core") (exceptions/) (/TransactionDefinition) (alterations/) (publish/) (/TransactionStatus) com.neusoft.persistence.exception.DataIntegrityViolationException: at com.neusoft.persistence.impl.dialect.SQLExceptionTranslator.assembleSQLException(SQLExceptionTranslator.java:82) at com.neusoft.persistence.impl.dialect.GenericDialect.assembleException(GenericDialect.java:717) at com.neusoft.persistence.impl.ExceptionCast.cast(ExceptionCast.java:21) at com.neusoft.persistence.impl.PersistenceImpl.doInsertRowSet(PersistenceImpl.java:741) at com.neusoft.persistence.impl.PersistenceImpl.updateRowSet(PersistenceImpl.java:665) at com.neusoft.persistence.impl.PersistenceImpl.update(PersistenceImpl.java:332) at com.neusoft.persistence.impl.PersistenceImpl.update(PersistenceImpl.java:315) at ep.boimpl.bssr.arcgp.OGPMeterImpl.put(OGPMeterImpl.java:343) at ep.boimpl.bssr.arcgp.OGPMeterImpl$$EnhancerByCGLIB$$b90e8165.CGLIB$put$0((generated)) at ep.boimpl.bssr.arcgp.OGPMeterImpl$$EnhancerByCGLIB$$b90e8165$$FastClassByCGLIB$$8e53b66.invoke((generated)) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) at com.neusoft.bean.impl.TransactionInterceptor.intercept(TransactionInterceptor.java:124) at ep.boimpl.bssr.arcgp.OGPMeterImpl$$EnhancerByCGLIB$$b90e8165.put((generated)) at ep.boimpl.bssr.ArcGPImpl.put(ArcGPImpl.java:103) at ep.boimpl.bssr.ArcGPImpl$$EnhancerByCGLIB$$ec832982.CGLIB$put$1((generated)) at ep.boimpl.bssr.ArcGPImpl$$EnhancerByCGLIB$$ec832982$$FastClassByCGLIB$$d74eb85.invoke((generated)) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) at com.neusoft.bean.impl.TransactionInterceptor.intercept(TransactionInterceptor.java:124) at ep.boimpl.bssr.ArcGPImpl$$EnhancerByCGLIB$$ec832982.put((generated)) at ep.boimpl.bssr.ArcGPImpl.put(ArcGPImpl.java:243) at ep.boimpl.bssr.ArcGPImpl$$EnhancerByCGLIB$$ec832982.CGLIB$put$3((generated)) at ep.boimpl.bssr.ArcGPImpl$$EnhancerByCGLIB$$ec832982$$FastClassByCGLIB$$d74eb85.invoke((generated)) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) at com.neusoft.bean.impl.TransactionInterceptor.intercept(TransactionInterceptor.java:124) at ep.boimpl.bssr.ArcGPImpl$$EnhancerByCGLIB$$ec832982.put((generated)) at ep.boimpl.bssp.ArchiveImpl.doSubmit(ArchiveImpl.java:290) at ep.boimpl.bssp.ArchiveImpl$$EnhancerByCGLIB$$76980d19.CGLIB$doSubmit$2((generated)) at ep.boimpl.bssp.ArchiveImpl$$EnhancerByCGLIB$$76980d19$$FastClassByCGLIB$$ce3aaa60.invoke((generated)) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) at com.neusoft.bean.impl.TransactionInterceptor.intercept(TransactionInterceptor.java:124) at ep.boimpl.bssp.ArchiveImpl$$EnhancerByCGLIB$$76980d19.doSubmit((generated)) at ep.boimpl.bssp.ArchiveAndFinishImpl.doSubmit(ArchiveAndFinishImpl.java:42) at ep.boimpl.bssp.ArchiveAndFinishImpl$$EnhancerByCGLIB$$b7e5be27.CGLIB$doSubmit$0((generated)) at ep.boimpl.bssp.ArchiveAndFinishImpl$$EnhancerByCGLIB$$b7e5be27$$FastClassByCGLIB$$9879af69.invoke((generated)) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) at com.neusoft.bean.impl.TransactionInterceptor.intercept(TransactionInterceptor.java:124) at ep.boimpl.bssp.ArchiveAndFinishImpl$$EnhancerByCGLIB$$b7e5be27.doSubmit((generated)) at ep.component.core.NavigationController.subCommit(NavigationController.java:592) at ep.component.core.NavigationController.commit(NavigationController.java:806) at ep.component.core.NavigationController$$EnhancerByCGLIB$$69a47cd2.CGLIB$commit$2((generated)) at ep.component.core.NavigationController$$EnhancerByCGLIB$$69a47cd2$$FastClassByCGLIB$$c26173cb.invoke((generated)) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) at com.neusoft.bean.impl.TransactionInterceptor.intercept(TransactionInterceptor.java:90) at ep.component.core.NavigationController$$EnhancerByCGLIB$$69a47cd2.commit((generated)) at sun.reflect.GeneratedMethodAccessor520.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.neusoft.component.ComponentServlet.execute(ComponentServlet.java:203) at com.neusoft.component.ComponentServlet.doPost(ComponentServlet.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.neusoft.commons.web.filter.EncodingFilter.doFilter(EncodingFilter.java:38) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) Caused by: java.sql.SQLException: ORA-00001: 违反唯一约束条件 (EPM_JX.PK_METER_ID) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454) at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:128) at com.neusoft.persistence.impl.Executor.updateOne(Executor.java:279) at com.neusoft.persistence.impl.Executor.update(Executor.java:258) at com.neusoft.persistence.impl.PersistenceImpl.doInsertRowSet(PersistenceImpl.java:732) ... 62 more  



以上是我目前实习的系统报错的原因,我是初级初级的DBA,现在需要通过数据库来把系统报错的问题解决掉,通过上面的报错我发现是在insert插入进C_METER表时有问题,是meter_id冲突了,我认为解决的办法是查出冲突的记录,把冲突的那张表格里的记录改变一下使用update一下meter_id或者删除掉使用delete。


此帖子未完待续,欢迎看到的伙伴说说如何解决这个系统报错“主键冲突异常的问题”

你可能感兴趣的:(主键冲突)