一个单纯的java代码里删除语句,如下:
报错信息:
java.lang.RuntimeException: org.springframework.dao.DuplicateKeyException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '48' for key 'PRIMARY'
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: DELETE FROM PSS_PRJ_HANGUP WHERE HU_ID=?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '48' for key 'PRIMARY'
; SQL []; Duplicate entry '48' for key 'PRIMARY'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '48' for key 'PRIMARY'
at com.sinoprof.scm.pub.service.impl.FlowExtServiceImpl.submit(FlowExtServiceImpl.java:62)
at com.sinoprof.scm.pub.service.impl.FlowExtServiceImpl$$FastClassBySpringCGLIB$$cef92be4.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:737)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:283)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672)
at com.sinoprof.scm.pub.service.impl.FlowExtServiceImpl$$EnhancerBySpringCGLIB$$2f2a868b.submit(<generated>)
at com.sinoprof.spm_project.hangup.service.impl.HangUpServiceImpl.submit(HangUpServiceImpl.java:198)
at com.sinoprof.spm_project.hangup.service.impl.HangUpServiceImpl$$FastClassBySpringCGLIB$$ace8ed1f.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJ