org.springframework.dao.DataIntegrityViolationException

could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

Solutions on the web525

  • via GitHub by siglocpp
    , 6 months ago
    could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
  • could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
  • could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
  • Stack trace

    • org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259)[spring-orm-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225)[spring-orm-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:417)[spring-orm-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)[spring-tx-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)[spring-tx-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)[spring-tx-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:131)[spring-data-jpa-1.9.1.RELEASE.jar!/:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at com.sun.proxy.$Proxy111.save(Unknown Source)[na:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[na:1.8.0_91] at java.lang.reflect.Method.invoke(Unknown Source)[na:1.8.0_91] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)[spring-tx-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE] at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)[spring-aop-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 11 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    2 times, 1 month ago
    Unknown user
    Once, 1 year ago
    6 more bugmates