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)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via javatalks.ru by Unknown author, 1 year ago
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
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.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 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)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.