Skip to content

Missing constructor for type after upgrading to Spring Boot 4.0.1 #49231

@aivanov-sw

Description

@aivanov-sw

When selecting a record type that is mapped as JSONB (e.g. via Hibernate’s @Type(JsonBinaryType.class)), the following error occurs:

org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.query.SemanticException: Missing constructor for type...

Everything worked on Spring Boot 3.5.0. It still works in the test EventRepositoryTest, where EntityManagerFactory is used, but it fails in the test EventRepositoryTest2. The issue only appears when the projected type is a Java record; with a normal class it does not occur. I recreated a sample project that reproduces this error https://github.com/aivanov-sw/bug-report/tree/develop

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions