com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60)))

Atlassian JIRA | Lauri Vasko | 3 years ago
  1. 0

    When user with enormous username tries to subscribe to filter, it fails with error in log. h6. Steps to reproduce * Create user with long username e.g. *extraLongUsername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789* * Log in with that user * Save issue search as filter * Subscribe to filter Now exception is thrown {code} 2013-10-01 11:52:42,488 http-bio-8443-exec-17 ERROR [500ErrorPage.jsp] Exception caught in 500 page org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60))) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60))) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:379) at com.atlassian.jira.entity.EntityUtils.createValue(EntityUtils.java:39) at com.atlassian.jira.issue.subscription.DefaultSubscriptionManager.createSubscription(DefaultSubscriptionManager.java:250) at com.atlassian.jira.bc.filter.DefaultFilterSubscriptionService.storeSubscription(DefaultFilterSubscriptionService.java:105) at com.atlassian.jira.web.action.filter.FilterSubscription.doExecute(FilterSubscription.java:165) <+1> (ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) <+7> (DefaultInterceptorChain.java:39) (NestedInterceptorChain.java:31) (ChainedInterceptor.java:16) (DefaultInterceptorChain.java:35) (GenericDispatcher.java:225) (GenericDispatcher.java:154) (JiraWebworkActionDispatcher.java:151) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) <+14> (ApplicationFilterChain.java:305) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:84) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (XContentTypeOptionsNoSniffFilter.java:22) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (HeaderSanitisingFilter.java:44) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) at com.atlassian.jira.tzdetect.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:39) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.jira.baseurl.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:38) <+8> (AbstractHttpFilter.java:31) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (ContextFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(ServingRequestsFilter.java:37) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:60) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:92) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:56) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.intenso.jira.contentinjection.filter.ContentInjectionFilter.doFilter(ContentInjectionFilter.java:69) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36) <+20> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AccessLogFilter.java:103) (AccessLogFilter.java:87) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (XsrfTokenAdditionRequestFilter.java:54) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (SiteMeshFilter.java:129) (SiteMeshFilter.java:77) (SitemeshPageFilter.java:124) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) at com.atlassian.plugin.remotable.plugin.module.permission.ApiScopingFilter.doFilter(ApiScopingFilter.java:62) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+22> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (SecurityFilter.java:234) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (TrustedApplicationsFilter.java:98) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (BaseLoginFilter.java:169) (JiraLoginFilter.java:70) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) (OAuthFilter.java:55) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+13> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ProfilingFilter.java:99) (JIRAProfilingFilter.java:19) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractJohnsonFilter.java:71) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) <+9> (UrlRewriteFilter.java:394) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (GzipFilter.java:80) (GzipFilter.java:51) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) at com.atlassian.plugin.remotable.plugin.module.oauth.OAuth2LOFilter.doFilter(OAuth2LOFilter.java:70) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.plugin.remotable.host.common.service.http.bigpipe.BigPipeRequestIdFilter.doFilter(BigPipeRequestIdFilter.java:33) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+41> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (JWDSendRedirectFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:84) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractCachingFilter.java:33) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractEncodingFilter.java:41) (AbstractHttpFilter.java:31) (PathMatchingEncodingFilter.java:49) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (JiraStartupChecklistFilter.java:74) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:84) (JiraFirstFilter.java:57) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (StandardWrapperValve.java:225) (StandardContextValve.java:123) (AuthenticatorBase.java:581) (StandardHostValve.java:168) (ErrorReportValve.java:98) (StandardEngineValve.java:118) (AccessLogValve.java:927) (CoyoteAdapter.java:407) (AbstractHttp11Processor.java:1001) (AbstractProtocol.java:585) (JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60))) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:136) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:101) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:64) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:487) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:467) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:374) ... 188 more {code} Problem is caused by *filtersubscription* DB table to have *username* column defined as *character varying(60)* Note that, i'm using PostgreSQL 9 and my JIRA DB has been around for ages and has been upgraded from previous versions. *Suggested Workaround* Add user with huge username to a new group, and subscribe the group to filters instead.

    Atlassian JIRA | 3 years ago | Lauri Vasko
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60)))
  2. 0

    When user with enormous username tries to subscribe to filter, it fails with error in log. h6. Steps to reproduce * Create user with long username e.g. *extraLongUsername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789* * Log in with that user * Save issue search as filter * Subscribe to filter Now exception is thrown {code} 2013-10-01 11:52:42,488 http-bio-8443-exec-17 ERROR [500ErrorPage.jsp] Exception caught in 500 page org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60))) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60))) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:379) at com.atlassian.jira.entity.EntityUtils.createValue(EntityUtils.java:39) at com.atlassian.jira.issue.subscription.DefaultSubscriptionManager.createSubscription(DefaultSubscriptionManager.java:250) at com.atlassian.jira.bc.filter.DefaultFilterSubscriptionService.storeSubscription(DefaultFilterSubscriptionService.java:105) at com.atlassian.jira.web.action.filter.FilterSubscription.doExecute(FilterSubscription.java:165) <+1> (ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) <+7> (DefaultInterceptorChain.java:39) (NestedInterceptorChain.java:31) (ChainedInterceptor.java:16) (DefaultInterceptorChain.java:35) (GenericDispatcher.java:225) (GenericDispatcher.java:154) (JiraWebworkActionDispatcher.java:151) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) <+14> (ApplicationFilterChain.java:305) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:84) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (XContentTypeOptionsNoSniffFilter.java:22) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (HeaderSanitisingFilter.java:44) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) at com.atlassian.jira.tzdetect.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:39) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.jira.baseurl.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:38) <+8> (AbstractHttpFilter.java:31) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (ContextFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(ServingRequestsFilter.java:37) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:60) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:92) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:56) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.intenso.jira.contentinjection.filter.ContentInjectionFilter.doFilter(ContentInjectionFilter.java:69) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36) <+20> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AccessLogFilter.java:103) (AccessLogFilter.java:87) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (XsrfTokenAdditionRequestFilter.java:54) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (SiteMeshFilter.java:129) (SiteMeshFilter.java:77) (SitemeshPageFilter.java:124) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) at com.atlassian.plugin.remotable.plugin.module.permission.ApiScopingFilter.doFilter(ApiScopingFilter.java:62) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+22> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (SecurityFilter.java:234) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (TrustedApplicationsFilter.java:98) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (BaseLoginFilter.java:169) (JiraLoginFilter.java:70) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) (OAuthFilter.java:55) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+13> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ProfilingFilter.java:99) (JIRAProfilingFilter.java:19) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractJohnsonFilter.java:71) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) <+9> (UrlRewriteFilter.java:394) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (GzipFilter.java:80) (GzipFilter.java:51) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) at com.atlassian.plugin.remotable.plugin.module.oauth.OAuth2LOFilter.doFilter(OAuth2LOFilter.java:70) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.plugin.remotable.host.common.service.http.bigpipe.BigPipeRequestIdFilter.doFilter(BigPipeRequestIdFilter.java:33) <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+41> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (JWDSendRedirectFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:84) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractCachingFilter.java:33) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractEncodingFilter.java:41) (AbstractHttpFilter.java:31) (PathMatchingEncodingFilter.java:49) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (JiraStartupChecklistFilter.java:74) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:84) (JiraFirstFilter.java:57) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (StandardWrapperValve.java:225) (StandardContextValve.java:123) (AuthenticatorBase.java:581) (StandardHostValve.java:168) (ErrorReportValve.java:98) (StandardEngineValve.java:118) (AccessLogValve.java:927) (CoyoteAdapter.java:407) (AbstractHttp11Processor.java:1001) (AbstractProtocol.java:585) (JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60))) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:136) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:101) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:64) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:487) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:467) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:374) ... 188 more {code} Problem is caused by *filtersubscription* DB table to have *username* column defined as *character varying(60)* Note that, i'm using PostgreSQL 9 and my JIRA DB has been around for ages and has been upgraded from previous versions. *Suggested Workaround* Add user with huge username to a new group, and subscribe the group to filters instead.

    Atlassian JIRA | 3 years ago | Lauri Vasko
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60)))
  3. 0

    h1. Symptom Getting the following error when trying to view a profile page: {noformat} jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.)) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserHistoryItem][id,10374][username,admin][data,null][entityId,admin][lastViewed,1350569188345][type,Assignee] (SQL Exception while executing the following:INSERT INTO jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:379) at com.atlassian.jira.user.OfBizUserHistoryStore.addHistoryItemNoChecks(OfBizUserHistoryStore.java:104) at com.atlassian.jira.user.CachingUserHistoryStore$2.run(CachingUserHistoryStore.java:94) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) at com.atlassian.jira.user.CachingUserHistoryStore.addHistoryItem(CachingUserHistoryStore.java:84) at com.atlassian.jira.user.SessionBasedAnonymousUserHistoryStore$2.run(SessionBasedAnonymousUserHistoryStore.java:120) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) {noformat} h2. Cause If a user's name changes case and you are connected to a database that does case insensitive comparison (e.g. MSSQL 2008 as setup following the steps on https://confluence.atlassian.com/x/CpX2Cw). The most common way for a user's name to change is for it to change in an external user directory where case is important (e.g. some LDAP servers). h2. Steps * Setup JIRA to an LDAP directory. * Create a user with username "testuser" in the internal JIRA directory. * Login with username "testuser" * Go to the user's profile page. * Inside the LDAP directory, create a user "TestUser". * Move the LDAP directory to the top. * (BUG) Go to the current user's profile page. You will get the above exception.

    Atlassian JIRA | 4 years ago | Brenden Bain [Atlassian]
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserHistoryItem][id,10374][username,admin][data,null][entityId,admin][lastViewed,1350569188345][type,Assignee] (SQL Exception while executing the following:INSERT INTO jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.))
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h1. Symptom Getting the following error when trying to view a profile page: {noformat} jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.)) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserHistoryItem][id,10374][username,admin][data,null][entityId,admin][lastViewed,1350569188345][type,Assignee] (SQL Exception while executing the following:INSERT INTO jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:379) at com.atlassian.jira.user.OfBizUserHistoryStore.addHistoryItemNoChecks(OfBizUserHistoryStore.java:104) at com.atlassian.jira.user.CachingUserHistoryStore$2.run(CachingUserHistoryStore.java:94) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) at com.atlassian.jira.user.CachingUserHistoryStore.addHistoryItem(CachingUserHistoryStore.java:84) at com.atlassian.jira.user.SessionBasedAnonymousUserHistoryStore$2.run(SessionBasedAnonymousUserHistoryStore.java:120) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) {noformat} h2. Cause If a user's name changes case and you are connected to a database that does case insensitive comparison (e.g. MSSQL 2008 as setup following the steps on https://confluence.atlassian.com/x/CpX2Cw). The most common way for a user's name to change is for it to change in an external user directory where case is important (e.g. some LDAP servers). h2. Steps * Setup JIRA to an LDAP directory. * Create a user with username "testuser" in the internal JIRA directory. * Login with username "testuser" * Go to the user's profile page. * Inside the LDAP directory, create a user "TestUser". * Move the LDAP directory to the top. * (BUG) Go to the current user's profile page. You will get the above exception.

    Atlassian JIRA | 4 years ago | Brenden Bain [Atlassian]
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserHistoryItem][id,10374][username,admin][data,null][entityId,admin][lastViewed,1350569188345][type,Assignee] (SQL Exception while executing the following:INSERT INTO jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.))
  6. 0

    h3. Summary When entering data into a single line text field in a Service Desk request, and this data exceeds the limit, you receive a message {{There was an error initialising the workflow}} h3. Environment * JIRA 7.0.0 * Service Desk 2.6.0 h3. Steps to Reproduce # Create a custom text field (single line) # Add this field on the Create Issue screen for a JIRA Project that is associated with a Service Desk. # Update the Service Desk customer portal to request this field. # Create a request on that Service Desk, while pasting the following paragraph into the custom field: {quote}Integer sagittis nisi vel rhoncus molestie. Aenean vehicula, ipsum id hendrerit sollicitudin, leo risus porttitor odio, eget ullamcorper dui tellus et magna. Mauris vitae justo ac neque pellentesque ultricies non sed libero. Maecenas sit amet neque ac arcu tristique elementum. Integer diam sapien, vestibulum eget accumsan nec, ultricies sit amet nisl. Vivamus et nisi nec risus laoreet suscipit at et erat. Ut a nisl a nibh imperdiet molestie vulputate id libero. Ut tincidunt sagittis ultricies. Praesent sit amet magna sagittis, volutpat magna ut, convallis orci. Mauris quam quam, gravida id quam non, accumsan finibus risus. Aenean diam neque, varius a neque non, auctor congue dui. Maecenas placerat lectus velit, in tincidunt nunc rutrum eu. Curabitur mollis ipsum ac nisi convallis vestibulum. Maecenas porta ex non enim dignissim, eget ultricies arcu finibus. Etiam commodo, turpis nec scelerisque volutpat, dolor magna aliquam nisl, non elementum mauris purus sit amet urna. Vivamus vel odio sed mauris vestibulum tincidunt rhoncus ut tortuur.{quote} # Submit. h3. Expected Results Error should say that it exceeds the character limit. h3. Actual Results Error displays at top of Service Desk request: !Screen Shot 2015-08-20 at 14.59.58.jpg|thumbnail! In logs: {noformat}@4000000055d448b90638a4cc 2015-08-19 12:13:19,084 ajp-nio-127.0.0.104-8009-exec-1 ERROR ####### 733x26422x1 wid9cd 109.186.171.142,104.192.140.178 /servicedesk/customer/portal/2/create/5 [c.a.s.i.f.customer.request.ServiceDeskWorkflowInitializationManager] Error initializing workflow @4000000055d448b90638b084 com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10033][issue,10307][stringvalue,Since the introduction of AutoCAD in 1982, Autodesk has become a leader in 3D design, engineering, and entertainment software. Today, Autodesk’s product portfolio spans more than 100 products, available in 18 different languages. The company employs over 2,000 software engineers, plus product and project managers who rely on JIRA to plan, collaborate, and ship great products.][id,10518] (SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(255))) @4000000055d448b90638eb1c at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:398) @4000000055d448b90638eb1c at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.createValue(WrappingOfBizDelegator.java:219) @4000000055d448b90638ef04 at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.createValuesInt(OfBizCustomFieldValuePersister.java:128) @4000000055d448b90638ef04 at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.updateValues(OfBizCustomFieldValuePersister.java:148) ... @4000000055d448b9063af2a4 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) @4000000055d448b9063af2a4 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) @4000000055d448b9063af68c at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) @4000000055d448b9063afa74 at java.lang.Thread.run(Thread.java:745) @4000000055d448b9063afa74 Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10033][issue,10307][stringvalue,Since the introduction of AutoCAD in 1982, Autodesk has become a leader in 3D design, engineering, and entertainment software. Today, Autodesk’s product portfolio spans more than 100 products, available in 18 different languages. The company employs over 2,000 software engineers, plus product and project managers who rely on JIRA to plan, collaborate, and ship great products.][id,10518] (SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(255))) @4000000055d448b9063b0dfc at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:213) @4000000055d448b9063b11e4 at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:178) ... @4000000055d448b9063b15cc at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:393) @4000000055d448b9063b1d9c ... 388 more @4000000055d448b9063b1d9c Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(255)) @4000000055d448b9063b2954 at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:684) @4000000055d448b9063b2954 at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:205) @4000000055d448b9063b2d3c ... 394 more @4000000055d448b9063b3124 Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255) @4000000055d448b9063b3124 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077) ... @4000000055d448b9063b4894 at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:97) @4000000055d448b9063b5064 at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:674) @4000000055d448b9063b544c ... 395 more {noformat} h3. Workaround Reduce the length of the data in the custom text fields.

    Atlassian JIRA | 1 year ago | Shannon Mackie [Atlassian]
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10033][issue,10307][stringvalue,Since the introduction of AutoCAD in 1982, Autodesk has become a leader in 3D design, engineering, and entertainment software. Today, Autodesk’s product portfolio spans more than 100 products, available in 18 different languages. The company employs over 2,000 software engineers, plus product and project managers who rely on JIRA to plan, collaborate, and ship great products.][id,10518] (SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(255))) @4000000055d448b90638eb1c at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:398) @4000000055d448b90638eb1c at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.createValue(WrappingOfBizDelegator.java:219)

    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:FilterSubscription][id,14551][username,extralongusername0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789][filterID,26581][lastRun,null][emailOnEmpty,false][group,null] (SQL Exception while executing the following:INSERT INTO public.filtersubscription (ID, FILTER_I_D, USERNAME, groupname, LAST_RUN, EMAIL_ON_EMPTY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(60)))

      at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue()
    2. com.atlassian.jira
      DefaultFilterSubscriptionService.storeSubscription
      1. com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:379)
      2. com.atlassian.jira.entity.EntityUtils.createValue(EntityUtils.java:39)
      3. com.atlassian.jira.issue.subscription.DefaultSubscriptionManager.createSubscription(DefaultSubscriptionManager.java:250)
      4. com.atlassian.jira.bc.filter.DefaultFilterSubscriptionService.storeSubscription(DefaultFilterSubscriptionService.java:105)
      4 frames