JPQL queries that directly select JSON fields containing Java records (using JsonBinaryType from Hypersistence Utils) fail in Spring Boot 4.0.0 with Hibernate 7 Hibernate incorrectly attempts to use a new constructor for record types, resulting in SemanticException: Missing constructor for type ‘Registration’. The same query works correctly with regular Java classes. This functionality worked correctly in Spring Boot 3.5.x.
Please try to create a reproducer with our test case template and if you are able to reproduce the issue, create a bug ticket in our issue tracker and attach that reproducer.
I’ve successfully reproduced the issue, but I don’t have access rights to create a ticket in your issue tracker. I can provide the reproducer if someone else can create the ticket, or if you can grant me the necessary permissions.
Hey and thanks for working on this. We’ve had a couple of reports about problems with Jira in the past:
- Problem with https://hibernate.atlassian.net
- Request for Jira issue creation permission (Hibernate ORM)
It seems that oftentimes, the problems just went away after a couple of days, as if there was a cool down period after signing up. I’d appreciate if you could try the suggestions reported on the linked discussions to see if you can make it work somehow.
Thank you for the information. However, I’m experiencing an issue: when I click the Create button, nothing happens. Could you please help me troubleshoot this?
@artemivnweb12 Others have had problems in the past, though never a button that just didn’t work – there usually was a popup with an error message.
I recommend you make sure you don’t have any browser extension that could mistakenly interfere (javascript blocker, adblocker). If you don’t, try logging out, then logging in from this website, not from another Atlassian website. Login is known to be wonky on Jira Cloud sometimes.
If that doesn’t work, double-check the account you’re using is the one you intended to use, and try to create an account with the same email address. Some accounts have been only partially created, through an invitation that wasn’t accepted, and they don’t work correctly until you complete registration.
If that doesn’t work… give us your Jira username, and whatever you intended to report, so that worst case we can create the issue ourselves ![]()
I’ve successfully reproduced the issue. The test EventRepositoryTest.shouldFindAdditionalInfo() fails when using a Java Record with JsonBinaryType in a JPQL projection query. Fails when using a Java Record with JsonBinaryType in a JPQL projection query. This problem did not exist in Spring Boot 3.5 — the same code with Java Records worked correctly before the migration to Spring Boot 4.0.1.
I don’t know what the JsonBinaryType does since it is not a Hibernate ORM type, but please try to get rid of the Spring specifics in your reproducer application. We don’t want to debug Spring code nor do we know what it configures or does behind the scenes.
If you want someone to look into this matter, please create a reproducer based on our test case template.
I rewrote the error reproduction test based on your data. The strange error no longer occurs, I can’t understand why report-hibernate/src/test/java/org/example/reporthibernate/EventRepositoryTest.java at master · aivanov-sw/report-hibernate · GitHub
