spring-projects / spring-projects/spring-modulith

Table event_publication: value too long for type

Open
#471 5 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Jan 19, 2024.

in: event publication registry meta: waiting for feedback
Dominant language
Java
Stars
1.2k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

When saving an Event in PostgreSQL I get the following error:

Caused by: org.hibernate.exception.DataException: could not execute statement [ERROR: value too long for type character varying(255)] [insert into event_publication (completion_date,event_type,listener_id,publication_date,serialized_event,id) values (?,?,?,?,?,?)]

So then I forced that column to be of type bytea by creating an orm.xml in META-INF. Then I got this error:

org.hibernate.exception.SQLGrammarException: could not execute statement [ERROR: column "serialized_event" is of type bytea but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 129] [insert into event_publication (completion_date,event_type,listener_id,publication_date,serialized_event,id) values (?,?,?,?,?,?)]

How to solve this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.