com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException

Duplicate entry '16' for key 'PRIMARY' Error Code: 1062 Call: INSERT INTO unit (id, addr_street, addr_building, admin_email, version, addr_postcode, addr_room, addr_city, name, descr, admin_phone, winDomain, dynamicEnabled, authority_id, organization_id, aup_policy_id, alert_policy_id, image_policy_id, monitor_policy_id, audit_event_policy_id, parent_id, access_policy_id, lib_policy_id, web_policy_id, ldap_sync_policy_id, TYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [16, null, null, , 1, null, null, null, USER GROUP, null, null, null, false, 2, 3, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 5] Query: WriteObjectQuery(UserGroup:16 USER GROUP)

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1

  • Stack trace

    • com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '16' for key 'PRIMARY' Error Code: 1062 Call: INSERT INTO unit (id, addr_street, addr_building, admin_email, version, addr_postcode, addr_room, addr_city, name, descr, admin_phone, winDomain, dynamicEnabled, authority_id, organization_id, aup_policy_id, alert_policy_id, image_policy_id, monitor_policy_id, audit_event_policy_id, parent_id, access_policy_id, lib_policy_id, web_policy_id, ldap_sync_policy_id, TYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [16, null, null, , 1, null, null, null, USER GROUP, null, null, null, false, 2, 3, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 5] Query: WriteObjectQuery(UserGroup:16 USER GROUP) at org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:345) at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:291) at $Proxy123.isDirectState(Unknown Source) at org.securus.units.InheriteUnitValue.inherite(InheriteUnitValue.java:111) at org.securus.units.InheriteUnitValue.onAfter(InheriteUnitValue.java:77) at org.securus.application.aspect.ChangeValueAspect$AfterCaller.callListener(ChangeValueAspect.java:75) at org.securus.application.aspect.ChangeValueAspect.callClassListeners(ChangeValueAspect.java:131) at org.securus.application.aspect.ChangeValueAspect.doAction(ChangeValueAspect.java:107) at org.securus.application.aspect.ChangeValueAspect.afterSetValue(ChangeValueAspect.java:87) at org.securus.units.UserImpl.setParentGroup(UserImpl.java:125) at org.securus.application.ldap.LDAPSyncBean.syncUser(LDAPSyncBean.java:570) at org.securus.application.ldap.LDAPSyncBean.syncUserGroup(LDAPSyncBean.java:394) at org.securus.application.ldap.LDAPSyncBean.checkSync(LDAPSyncBean.java:134) at org.securus.application.ldap.LDAPSyncBean.ejbTimeout(LDAPSyncBean.java:86) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:158) at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:141) at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67) at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:211) at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:169) at org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:284) at org.apache.openejb.core.timer.EjbTimerServiceImpl.access$100(EjbTimerServiceImpl.java:43) at org.apache.openejb.core.timer.EjbTimerServiceImpl$EjbTimeoutTimerTask$1.run(EjbTimerServiceImpl.java:350) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

    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

    We couldn't find other users who have seen this exception.