org.jooq.exception.DataAccessException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 5539#248537219
    via GitHub by michaelsproul
    ,
  • GitHub comment 41#289947026
    via GitHub by grooverdan
    ,
  • How Spark handle Exceptions at task
    via Stack Overflow by WeiChing Lin
    ,
  • UR and postgres
    via by Aaron Mangum,
    • 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. at org.jooq.impl.Tools.translate(Tools.java:1941) at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:659) at org.jooq.impl.BatchSingle.executePrepared(BatchSingle.java:259) at org.jooq.impl.BatchSingle.execute(BatchSingle.java:182) at org.jooq.impl.BatchCRUD.executePrepared(BatchCRUD.java:159) at org.jooq.impl.BatchCRUD.execute(BatchCRUD.java:100) at rungopher.db_access.DbMessage.persist(DbMessage.java:46) at rungopher.StartCampaign.sendFirstMessages(StartCampaign.java:166) at rungopher.StartCampaign.start(StartCampaign.java:85) at rungopher.CampaignEventHandler.handleDelivery(CampaignEventHandler.java:46) at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:144) at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:99) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: 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(BatchResultHandler.java:148) at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:780) at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1662) at org.jooq.tools.jdbc.DefaultStatement.executeBatch(DefaultStatement.java:93) at org.jooq.impl.BatchSingle.executePrepared(BatchSingle.java:239) ... 12 more
    No Bugmate found.