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.

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

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

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by michaelsproul
, 1 year ago
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.
via Google Groups by Unknown author, 8 months ago
SQL [select `book_author`.`book_id`, `book_author`.`author_id` from `book_author` where (`book_author`.`book_id` = ? and `book_author`.`author_id` = ?) for update]; Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
via GitHub by davidwatkins73
, 11 months ago
SQL [select .[id], .[name], .[description], .[kind], .[parent_id], .[created_at], .[updated_at] from [organisational_unit] where (CONTAINS(*, '3d AND [pr')) order by (select 0) offset 0 rows fetch next ? rows only]; Syntax error near '[' in the full-text search condition '3d AND [pr'.
via GitHub by kovax
, 9 months ago
SQL [create table if not exists EVENT(UUID varchar not null, ID int not null, TIMESTAMP timestamp with time zone not null, constraint "PK_EVENT" primary key (UUID, ID))]; length must be specified in type definition: VARCHAR in statement [create
via GitHub by kovax
, 9 months ago
SQL [create table if not exists EVENT(UUID uuid not null, ID int not null, TIMESTAMP timestamp with time zone not null, constraint "PK_EVENT" primary key (UUID, ID))]; Syntax error in SQL statement "CREATE TABLE IF NOT EXISTS EVENT(UUID UUID NOT
via Google Groups by Unknown author, 8 months ago
SQL [select ... from [database].[dbo].[table] where ([database].[dbo].[table].[id] in (?, ?, ?, ...) or [database].[dbo].[table].[id] in (?, ?, ?, ...) or [database].[dbo].[table].[id] in (?, ?)) -- SQL rendered with a free trial version of jOOQ
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.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)
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 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)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

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