com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,164381][created,2013-07-21 23:26:50.249][associationType,WatchIssue][sourceName,cchauvet][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO public.userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_userassociation" Detail: Key (source_name, sink_node_id, sink_node_entity, association_type)=(cchauvet, 164381, Issue, WatchIssue) already exists.))

Atlassian JIRA | Eric Dalgliesh | 3 years ago
  1. 0

    Clicking on the "Watch Issue" link can give you this stack trace: {noformat} com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,164381][created,2013-07-21 23:26:50.249][associationType,WatchIssue][sourceName,cchauvet][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO public.userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_userassociation" Detail: Key (source_name, sink_node_id, sink_node_entity, association_type)=(cchauvet, 164381, Issue, WatchIssue) already exists.)) at com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation(UserAssociationStoreImpl.java:67) at com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation(UserAssociationStoreImpl.java:46) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:206) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:193) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.startWatching(DefaultWatcherManager.java:80) at com.atlassian.jira.web.action.issue.VoteOrWatchIssue.doExecute(VoteOrWatchIssue.java:66) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:151) {noformat}

    Atlassian JIRA | 3 years ago | Eric Dalgliesh
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,164381][created,2013-07-21 23:26:50.249][associationType,WatchIssue][sourceName,cchauvet][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO public.userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_userassociation" Detail: Key (source_name, sink_node_id, sink_node_entity, association_type)=(cchauvet, 164381, Issue, WatchIssue) already exists.))
  2. 0

    Clicking on the "Watch Issue" link can give you this stack trace: {noformat} com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,164381][created,2013-07-21 23:26:50.249][associationType,WatchIssue][sourceName,cchauvet][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO public.userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_userassociation" Detail: Key (source_name, sink_node_id, sink_node_entity, association_type)=(cchauvet, 164381, Issue, WatchIssue) already exists.)) at com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation(UserAssociationStoreImpl.java:67) at com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation(UserAssociationStoreImpl.java:46) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:206) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:193) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.startWatching(DefaultWatcherManager.java:80) at com.atlassian.jira.web.action.issue.VoteOrWatchIssue.doExecute(VoteOrWatchIssue.java:66) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:151) {noformat}

    Atlassian JIRA | 3 years ago | Eric Dalgliesh
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,164381][created,2013-07-21 23:26:50.249][associationType,WatchIssue][sourceName,cchauvet][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO public.userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_userassociation" Detail: Key (source_name, sink_node_id, sink_node_entity, association_type)=(cchauvet, 164381, Issue, WatchIssue) already exists.))
  3. 0

    Version name: "this is not a version" Stack trace: 2011-11-07 16:52:30,110 http-8080-13 INFO admin 1012x1084x2 1mhke8u 172.20.9.85 /rest/greenhopper/1.0/release [greenhopper.service.version.ReleaseServiceImpl] creating versions in projects: [Project: ARA, Project: BULK, Project: XSS] 2011-11-07 16:52:30,126 http-8080-13 ERROR admin 1012x1084x2 1mhke8u 172.20.9.85 /rest/greenhopper/1.0/release [greenhopper.service.version.ReleaseServiceImpl] org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Version][id,10040][project,10031 ][description,URGHH][sequence,6][name,this is not a version][releasedate,2011-11-07 00:00:00.0] (SQL Exception while executing the following:INSERT INTO public.projectversion (ID, PROJECT, vname, DESCRIPTION, SEQUENCE, RELEASED, ARCHIVED, URL, RELEASEDATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_projectversion")) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Version][id,10040][project,10031][description,URGHH][sequence,6][name,this is not a version][releasedate,2011-11-07 00:00:00.0] (SQL Exception while executing the following:INSERT INTO public.projectversion (ID, PROJECT, vname, DESCRIPTION, SEQUENCE, RELEASED, ARCHIVED, URL, RELEASEDATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_projectversion")) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:365) at com.atlassian.jira.project.version.OfBizVersionStore.createVersion(OfBizVersionStore.java:35) at com.atlassian.jira.project.version.CachingVersionStore.createVersion(CachingVersionStore.java:79) at com.atlassian.jira.project.version.DefaultVersionManager.createVersion(DefaultVersionManager.java:118) at com.atlassian.jira.bc.project.version.DefaultVersionService.createVersion(DefaultVersionService.java:528) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211) at $Proxy185.createVersion(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at $Proxy185.createVersion(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at $Proxy185.createVersion(Unknown Source) at com.atlassian.greenhopper.service.version.VersionServiceImpl.createVersions(VersionServiceImpl.java:79)

    Atlassian JIRA | 5 years ago | Kara Hatherly
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Version][id,10040][project,10031][description,URGHH][sequence,6][name,this is not a version][releasedate,2011-11-07 00:00:00.0] (SQL Exception while executing the following:INSERT INTO public.projectversion (ID, PROJECT, vname, DESCRIPTION, SEQUENCE, RELEASED, ARCHIVED, URL, RELEASEDATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_projectversion"))
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Steps to reproduce # Start with JIRA < 6.2-OD-3/icebat-85.0. # Create a custom issue status, which is created with an ID of 10000. # Upgrade to JIRA 6.2-OD-3/icebat-85.0. # Try to create another issue status, and you'll receive a stack trace: {code} com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10000][sequence,12][description,null][name,A New Status][statuscategory,1][iconurl,/images/icons/statuses/generic.png] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus")) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:395) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.createValue(WrappingOfBizDelegator.java:219) at com.atlassian.jira.config.AbstractIssueConstantsManager.createConstant(AbstractIssueConstantsManager.java:38) at com.atlassian.jira.config.DefaultStatusManager.createStatus(DefaultStatusManager.java:73) at com.atlassian.jira.bc.config.DefaultStatusService.createStatus(DefaultStatusService.java:75) at com.atlassian.jira.web.action.admin.statuses.ViewStatuses.addConstant(ViewStatuses.java:196) at com.atlassian.jira.web.action.admin.constants.AbstractViewConstants.doAddConstant(AbstractViewConstants.java:42) at com.atlassian.jira.web.action.admin.statuses.ViewStatuses.doAddStatus(ViewStatuses.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) [...] {code} Try to create it a second time and it'll work fine, as the new status is then created with an ID of 10001. The more custom issue statuses already exist in an instance, the more times you have to click Add in order to get past the latest ID. h3. Workaround If on OnDemand contact support, support will: # Shutdown JIRA # Backup the database # Identify the current maximum value of the issuestatus id {noformat} select id::integer from issuestatus order by id desc limit 1; {noformat} # Update the sequence_value_item table to define the Status sequence ID as 1 higher than the value identified in the previous step {noformat} update sequence_value_item set seq_id = <value from above + 1> where seq_name = 'Status'; {noformat} # Start JIRA back up.

    Atlassian JIRA | 3 years ago | Nick Mason [Atlassian]
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10000][sequence,12][description,null][name,A New Status][statuscategory,1][iconurl,/images/icons/statuses/generic.png] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus"))
  6. 0

    h3. Steps to reproduce # Start with JIRA < 6.2-OD-3/icebat-85.0. # Create a custom issue status, which is created with an ID of 10000. # Upgrade to JIRA 6.2-OD-3/icebat-85.0. # Try to create another issue status, and you'll receive a stack trace: {code} com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10000][sequence,12][description,null][name,A New Status][statuscategory,1][iconurl,/images/icons/statuses/generic.png] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus")) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:395) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.createValue(WrappingOfBizDelegator.java:219) at com.atlassian.jira.config.AbstractIssueConstantsManager.createConstant(AbstractIssueConstantsManager.java:38) at com.atlassian.jira.config.DefaultStatusManager.createStatus(DefaultStatusManager.java:73) at com.atlassian.jira.bc.config.DefaultStatusService.createStatus(DefaultStatusService.java:75) at com.atlassian.jira.web.action.admin.statuses.ViewStatuses.addConstant(ViewStatuses.java:196) at com.atlassian.jira.web.action.admin.constants.AbstractViewConstants.doAddConstant(AbstractViewConstants.java:42) at com.atlassian.jira.web.action.admin.statuses.ViewStatuses.doAddStatus(ViewStatuses.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) [...] {code} Try to create it a second time and it'll work fine, as the new status is then created with an ID of 10001. The more custom issue statuses already exist in an instance, the more times you have to click Add in order to get past the latest ID. h3. Workaround If on OnDemand contact support, support will: # Shutdown JIRA # Backup the database # Identify the current maximum value of the issuestatus id {noformat} select id::integer from issuestatus order by id desc limit 1; {noformat} # Update the sequence_value_item table to define the Status sequence ID as 1 higher than the value identified in the previous step {noformat} update sequence_value_item set seq_id = <value from above + 1> where seq_name = 'Status'; {noformat} # Start JIRA back up.

    Atlassian JIRA | 3 years ago | Nick Mason
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10000][sequence,12][description,null][name,A New Status][statuscategory,1][iconurl,/images/icons/statuses/generic.png] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus"))

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.jira.exception.DataAccessException

      org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,164381][created,2013-07-21 23:26:50.249][associationType,WatchIssue][sourceName,cchauvet][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO public.userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_userassociation" Detail: Key (source_name, sink_node_id, sink_node_entity, association_type)=(cchauvet, 164381, Issue, WatchIssue) already exists.))

      at com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation()
    2. com.atlassian.jira
      VoteOrWatchIssue.doExecute
      1. com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation(UserAssociationStoreImpl.java:67)
      2. com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation(UserAssociationStoreImpl.java:46)
      3. com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:206)
      4. com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:193)
      5. com.atlassian.jira.issue.watchers.DefaultWatcherManager.startWatching(DefaultWatcherManager.java:80)
      6. com.atlassian.jira.web.action.issue.VoteOrWatchIssue.doExecute(VoteOrWatchIssue.java:66)
      6 frames
    3. webwork.action
      ActionSupport.execute
      1. webwork.action.ActionSupport.execute(ActionSupport.java:165)
      1 frame
    4. com.atlassian.jira
      JiraActionSupport.execute
      1. com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83)
      1 frame
    5. webwork.interceptor
      DefaultInterceptorChain.proceed
      1. webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
      2. webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31)
      3. webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16)
      4. webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35)
      4 frames
    6. webwork.dispatcher
      GenericDispatcher.executeAction
      1. webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225)
      2. webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154)
      2 frames
    7. com.atlassian.jira
      JiraWebworkActionDispatcher.service
      1. com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:151)
      1 frame