org.jooq.exception.DataAccessException: SQL [insert into "public"."message" ("metadata") values (cast(? as varchar))]; Batch entry 0 insert into "public"."message" ("metadata") values (cast(NULL as varchar)) was aborted: ERROR: column "metadata" is of type json but expression is of type character varying Hint: You will need to rewrite or cast the expression. Position: 258 Call getNextException to see the cause.

GitHub | michaelsproul | 3 months ago
  1. 0

    GitHub comment 5539#248537219

    GitHub | 3 months ago | michaelsproul
    org.jooq.exception.DataAccessException: SQL [insert into "public"."message" ("metadata") values (cast(? as varchar))]; Batch entry 0 insert into "public"."message" ("metadata") values (cast(NULL as varchar)) was aborted: ERROR: column "metadata" is of type json but expression is of type character varying Hint: You will need to rewrite or cast the expression. Position: 258 Call getNextException to see the cause.
  2. 0

    Here is the full stack trace caused by this exception {noformat} 14:19:02,046 DEBUG atlassian.crowd.console.action.BaseAction: Starting Transaction 14:19:02,218 WARN org.hibernate.util.JDBCExceptionReporter: SQL Error: 0, SQLState: null 14:19:02,218 ERROR org.hibernate.util.JDBCExceptionReporter: Batch entry 0 insert into public."APPLICATIONGROUPS" ("APPLICATIONID", "INDEX", "ACTIVE", "NAME", "DIRECTORYID") values (167, 0, 1, confluence-users, 18) was aborted. Call getNextException to see the cause. 14:19:02,218 WARN org.hibernate.util.JDBCExceptionReporter: SQL Error: 0, SQLState: 23505 14:19:02,218 ERROR org.hibernate.util.JDBCExceptionReporter: ERROR: duplicate key violates unique constraint "APPLICATIONGROUPS_pkey" 14:19:02,234 ERROR org.hibernate.event.def.AbstractFlushingEventListener: Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.update(HibernateDAO.java:43) at com.atlassian.crowd.model.application.ApplicationDAOHibernate.update(ApplicationDAOHibernate.java:104) at com.atlassian.crowd.manager.application.ApplicationManagerGeneric.update(ApplicationManagerGeneric.java:130) at com.atlassian.crowd.console.action.application.UpdateGroups.doAddGroup(UpdateGroups.java:76) 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:324) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:364) at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:216) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:116) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113) at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:131) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:534) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into public."APPLICATIONGROUPS" ("APPLICATIONID", "INDEX", "ACTIVE", "NAME", "DIRECTORYID") values (167, 0, 1, confluence-users, 18) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2478) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1298) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:347) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2540) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) ... 57 more 14:19:02,234 WARN crowd.util.persistence.hibernate.HibernateDAO: Could not execute JDBC batch update org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.update(HibernateDAO.java:43) at com.atlassian.crowd.model.application.ApplicationDAOHibernate.update(ApplicationDAOHibernate.java:104) at com.atlassian.crowd.manager.application.ApplicationManagerGeneric.update(ApplicationManagerGeneric.java:130) at com.atlassian.crowd.console.action.application.UpdateGroups.doAddGroup(UpdateGroups.java:76) 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:324) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:364) at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:216) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:116) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113) at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:131) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:534) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into public."APPLICATIONGROUPS" ("APPLICATIONID", "INDEX", "ACTIVE", "NAME", "DIRECTORYID") values (167, 0, 1, confluence-users, 18) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2478) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1298) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:347) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2540) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) ... 57 more 14:19:02,234 DEBUG crowd.console.action.application.UpdateGroups: Could not execute JDBC batch update com.atlassian.crowd.manager.application.ApplicationManagerException: Could not execute JDBC batch update at com.atlassian.crowd.manager.application.ApplicationManagerGeneric.update(ApplicationManagerGeneric.java:133) at com.atlassian.crowd.console.action.application.UpdateGroups.doAddGroup(UpdateGroups.java:76) 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:324) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:364) at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:216) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:116) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113) at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:131) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:534) Caused by: com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.update(HibernateDAO.java:47) at com.atlassian.crowd.model.application.ApplicationDAOHibernate.update(ApplicationDAOHibernate.java:104) at com.atlassian.crowd.manager.application.ApplicationManagerGeneric.update(ApplicationManagerGeneric.java:130) ... 49 more Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.update(HibernateDAO.java:43) ... 51 more Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into public."APPLICATIONGROUPS" ("APPLICATIONID", "INDEX", "ACTIVE", "NAME", "DIRECTORYID") values (167, 0, 1, confluence-users, 18) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2478) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1298) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:347) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2540) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) ... 57 more 14:19:02,250 DEBUG atlassian.crowd.console.action.BaseAction: Rolling Back Transaction {noformat}

    Atlassian JIRA | 10 years ago | Justin Koke
    com.atlassian.crowd.manager.application.ApplicationManagerException: Could not execute JDBC batch update
  3. 0

    When a channel's start() method is called, it always submits a StartTask. However even if the current channel state is PAUSED instead of STOPPED, it will go through all the normal start stuff as if the channel was stopped. This happens to not be an issue most of the time because we check specific connector states before calling start() on them. However it can definitely cause issues when using the source queue. Create a channel that uses the source queue, and feed it messages faster than it can process them. Then pause the channel, so that the source queue thread is still running. On a separate Administrator that thinks the channel is stopped, attempt to start the channel. Instead of submitting a ResumeTask, a StartTask is submitted instead, and a _second_ source queue thread is actually started up. Aside from obvious message order concerns, this also causes SQL exceptions: \\ {code}ERROR 2014-03-24 09:44:14,146 [Thread-33] com.mirth.connect.donkey.server.channel.Channel: An error occurred in channel test (98764927-a0e9-4a58-8933-00889b0b9ae5) while processing message ID 44 from the source queue com.mirth.connect.donkey.server.data.DonkeyDaoException: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO D_MC1 (METADATA_ID, MESSAGE_ID, CONTENT_TYPE, CONTENT, DATA_TYPE, IS_ENCRYPTED) VALUES ('0', '44', '2', 'dummy', 'HL7V2', '0') was aborted. Call getNextException to see the cause. at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.executeBatchInsertMessageContent(JdbcDao.java:219) at com.mirth.connect.donkey.server.data.buffered.BufferedDao.executeTasks(BufferedDao.java:100) at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:74) at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:56) at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1394) at com.mirth.connect.donkey.server.channel.Channel.processSourceQueue(Channel.java:1528) at com.mirth.connect.donkey.server.channel.Channel.run(Channel.java:1515) at java.lang.Thread.run(Thread.java:680) Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO D_MC1 (METADATA_ID, MESSAGE_ID, CONTENT_TYPE, CONTENT, DATA_TYPE, IS_ENCRYPTED) VALUES ('0', '44', '2', 'dummy', 'HL7V2', '0') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2619) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752) at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.executeBatchInsertMessageContent(JdbcDao.java:217) ... 7 more{code}

    Mirth Project | 3 years ago | Nick Rupley
    com.mirth.connect.donkey.server.data.DonkeyDaoException: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO D_MC1 (METADATA_ID, MESSAGE_ID, CONTENT_TYPE, CONTENT, DATA_TYPE, IS_ENCRYPTED) VALUES ('0', '44', '2', 'dummy', 'HL7V2', '0') was aborted. Call getNextException to see the cause.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When a channel's start() method is called, it always submits a StartTask. However even if the current channel state is PAUSED instead of STOPPED, it will go through all the normal start stuff as if the channel was stopped. This happens to not be an issue most of the time because we check specific connector states before calling start() on them. However it can definitely cause issues when using the source queue. Create a channel that uses the source queue, and feed it messages faster than it can process them. Then pause the channel, so that the source queue thread is still running. On a separate Administrator that thinks the channel is stopped, attempt to start the channel. Instead of submitting a ResumeTask, a StartTask is submitted instead, and a _second_ source queue thread is actually started up. Aside from obvious message order concerns, this also causes SQL exceptions: \\ {code}ERROR 2014-03-24 09:44:14,146 [Thread-33] com.mirth.connect.donkey.server.channel.Channel: An error occurred in channel test (98764927-a0e9-4a58-8933-00889b0b9ae5) while processing message ID 44 from the source queue com.mirth.connect.donkey.server.data.DonkeyDaoException: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO D_MC1 (METADATA_ID, MESSAGE_ID, CONTENT_TYPE, CONTENT, DATA_TYPE, IS_ENCRYPTED) VALUES ('0', '44', '2', 'dummy', 'HL7V2', '0') was aborted. Call getNextException to see the cause. at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.executeBatchInsertMessageContent(JdbcDao.java:219) at com.mirth.connect.donkey.server.data.buffered.BufferedDao.executeTasks(BufferedDao.java:100) at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:74) at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:56) at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1394) at com.mirth.connect.donkey.server.channel.Channel.processSourceQueue(Channel.java:1528) at com.mirth.connect.donkey.server.channel.Channel.run(Channel.java:1515) at java.lang.Thread.run(Thread.java:680) Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO D_MC1 (METADATA_ID, MESSAGE_ID, CONTENT_TYPE, CONTENT, DATA_TYPE, IS_ENCRYPTED) VALUES ('0', '44', '2', 'dummy', 'HL7V2', '0') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2619) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752) at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.executeBatchInsertMessageContent(JdbcDao.java:217) ... 7 more{code}

    Mirth Project | 3 years ago | Nick Rupley
    com.mirth.connect.donkey.server.data.DonkeyDaoException: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO D_MC1 (METADATA_ID, MESSAGE_ID, CONTENT_TYPE, CONTENT, DATA_TYPE, IS_ENCRYPTED) VALUES ('0', '44', '2', 'dummy', 'HL7V2', '0') was aborted. Call getNextException to see the cause.
  6. 0

    Load fact table - Multiple runs

    pentaho.com | 1 year ago
    org.pentaho.di.core.exception.KettleException: Error batch inserting rows into table [test_fact]. Errors encountered (first 10): ERROR: duplicate key value violates unique constraint "test_fact_pkey" Detail: Key (id)=(1) already exists. Error updating batch Batch entry 0 INSERT INTO "public".test_fact (id, year_id, country_id, indicator_id, "value") VALUES ( 1, 1, 11, 1, 0) was aborted. Call getNextException to see the cause.

    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. java.sql.BatchUpdateException

      Batch entry 0 insert into "public"."message" ("campaign_id", "conversation_id", "start_state", "end_state", "link_followed", "kind", "sender", "recipient", "content", "metadata", "timestamp", "source") values (777, 15, '<<start>>', 'askEmail', 0, 'outbound_sms'::"public"."message_kind", '+61418974654', '+61434193516', 'Hi friend, what''s your email?', cast(NULL as varchar), 1474442678514002972, 0) was aborted: ERROR: column "metadata" is of type json but expression is of type character varying Hint: You will need to rewrite or cast the expression. Position: 258 Call getNextException to see the cause.

      at org.postgresql.jdbc.BatchResultHandler.handleError()
    2. org.postgresql.jdbc
      PgPreparedStatement.executeBatch
      1. org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:148)
      2. org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:780)
      3. org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1662)
      3 frames
    3. jOOQ
      BatchCRUD.execute
      1. org.jooq.tools.jdbc.DefaultStatement.executeBatch(DefaultStatement.java:93)
      2. org.jooq.impl.BatchSingle.executePrepared(BatchSingle.java:239)
      3. org.jooq.impl.BatchSingle.execute(BatchSingle.java:182)
      4. org.jooq.impl.BatchCRUD.executePrepared(BatchCRUD.java:159)
      5. org.jooq.impl.BatchCRUD.execute(BatchCRUD.java:100)
      5 frames
    4. rungopher.db_access
      DbMessage.persist
      1. rungopher.db_access.DbMessage.persist(DbMessage.java:46)
      1 frame
    5. rungopher
      CampaignEventHandler.handleDelivery
      1. rungopher.StartCampaign.sendFirstMessages(StartCampaign.java:166)
      2. rungopher.StartCampaign.start(StartCampaign.java:85)
      3. rungopher.CampaignEventHandler.handleDelivery(CampaignEventHandler.java:46)
      3 frames
    6. RabbitMQ Java Client
      ConsumerWorkService$WorkPoolRunnable.run
      1. com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:144)
      2. com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:99)
      2 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames