-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double Array Hibernate @JdbcTypeCode(SqlTypes.ARRAY) causes NullPointerException with 6.6.0.Final #43056
Comments
I have confirmed this is a regression in Quarkus 3.14.2. Not only does Quarkus boot with 3.12.3 but the JAX-RS & JPA layer works perfect with the entity annotations above. Specifically @JdbcTypeCode(SqlTypes.ARRAY) worked perfectly with double integer array data. Also our annLims column is typed as _int4. |
Hey, Thanks for reporting.
Seems likely. Either that or a this is just a usecase that was not intended to work and happened to work by chance: I had a quick look and could not find tests about persisting arrays of arrays in Hibernate ORM. What's this In any case, can you please set up a reproducer based on this and submit a bug report on the Hibernate Jira, linking it here? |
The @JSONVIEW is a Jackson thing that lets us customize what fields are returned to the user during the JAX-RS serialization process so you can ignore that, not relevant for this bug. The key is just to add a few columns to one of your existing Hibernate tests and just make sure that Hibernate can read/write the single & multi-dimensional arrays correctly. This worked perfectly in Hibernate 5.x and 6.x through Quarkus 3.12.3 (not sure which version broke it, but does not work in 3.14.2.
(with Postgres DB column of _int4)
(with Postgres DB column of _varchar) We use a lot of single arrays, String, Integer, Double, etc But for double arrays the above is the only one I found but should work with any data type. |
Here is a reproducer, As soon as I added the double array field the test framework failed. `@Entity
}` JPAUnitTestCase test case ` @test
|
Thank you. Reported upstream as https://hibernate.atlassian.net/browse/HHH-18582 |
@dhoffer Please head over to https://hibernate.atlassian.net/browse/HHH-18582 if you want to make your case, because mapping arrays of arrays is being described as a non-feature (not intended to work) and apparently can't be made to work on ORM 6.5 with your reproducer. |
@yrodiere Okay I went to the hibernate link and made my case. It's always worked pre hibernate 6.6.0 and we have massive production databases using it so its a blocker for us. |
Status:
|
Describe the bug
We had previously upgraded our application to Quarkus 3.12.3 and the following entity mapping appeared to work fine, it did not cause errors at boot time.
However today I updated to Quarkus 3.14.2 which uses Hibernate 6.6.0.Final and the above entity mapping causes this fatal error at boot time.
Is this a regression in Hibernate? Or perhaps is there a new SqlTypes enum for double arrays? I did not see one.
Expected behavior
Expected no errors at boot time.
Actual behavior
java.lang.NullPointerException at boot time, stack trace is above.
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
java 21.0.4 2024-07-16 LTS
Quarkus version or git rev
3.14.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Additional information
No response
The text was updated successfully, but these errors were encountered: