Skip to content

[Grails8 Hibernate7] Mapping a property to "type: 'text'" throws a CommandAcceptanceException #16010

Closed

Description

@Taack

Expected Behavior

Our app should launch without exception, even if database DDL are executed.

Actual Behaviour

An exception is thrown:

WARN 78010 --- [           main] o.h.t.s.i.ExceptionHandlerLoggedImpl     : GenerationTarget encountered exception accepting command : Error executing DDL "
    alter table if exists application_message 
       alter column body set data type varchar(32600)" via JDBC [ERROR: value too long for type character varying(32600)]

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "
    alter table if exists application_message 
       alter column body set data type varchar(32600)" via JDBC [ERROR: value too long for type character varying(32600)]

Steps To Reproduce

  1. Create a domain class with a mapping:
@GrailsCompileStatic
class ApplicationMessage {
    String body

    static constraints = {
    }

    static mapping = {
        body type: 'text'
    }
}
  1. Use bootRun task, it should fail at startup with a similar message than above.

Environment Information

❯ psql -V
psql (PostgreSQL) 18.4

❯ uname -a
Linux auo-big-achyos 7.1.3-2-cachyos #1 SMP PREEMPT_DYNAMIC Wed, 08 Jul 2026 06:14:22 +0000 x86_64 GNU/Linux

❯ java -fullversion
openjdk full version "25.0.3"

Example Application

No response

Version

Grails 8.0.0-M3

Activity

  1. added this to the grails:8.0.0-RC1 milestone on Jul 25, 2026
  2. added a commit that references this issue on Aug 16, 2026
    54ea208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions