Skip to content
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

Add module for hibernate 6.4 #691

Closed
wants to merge 1 commit into from

Conversation

adrianAzoitei
Copy link

@adrianAzoitei adrianAzoitei commented Dec 22, 2023

Not much seems to be needed for this module, after the work done in #684.

Fixes #685.

@adrianAzoitei adrianAzoitei marked this pull request as draft December 22, 2023 10:18
@vladmihalcea
Copy link
Owner

@adrianAzoitei Thanks. I'll review it when I have some time.

@vladmihalcea
Copy link
Owner

@adrianAzoitei There are many issues:

[ERROR] Errors:
[ERROR] io.hypersistence.utils.hibernate.type.array.ArrayTypeNativeQueryTest.test(io.hypersistence.utils.hibernate.type.array.ArrayTypeNativeQueryTest)
[ERROR]   Run 1: ArrayTypeNativeQueryTest>AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ArrayTypeNativeQueryTest>AbstractHibernateTest.destroy:119 » NullPointer Canno...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.ArrayTypeTest)
[ERROR]   Run 1: ArrayTypeTest.init:62->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invoke "j...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ArrayTypeTest.testLargeArray(io.hypersistence.utils.hibernate.type.array.ArrayTypeTest)
[ERROR]   Run 1: ArrayTypeTest.init:62->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invoke "j...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest.testCriteriaAPI(io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest)
[ERROR]   Run 1: BindArrayTypeQueryParameterTest.init:58->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: BindArrayTypeQueryParameterTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest.testJPQLWithDefaultParameterBiding(io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest)
[ERROR]   Run 1: BindArrayTypeQueryParameterTest.init:58->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: BindArrayTypeQueryParameterTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest.testJPQLWithExplicitParameterTypeBinding(io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest)
[ERROR]   Run 1: BindArrayTypeQueryParameterTest.init:58->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: BindArrayTypeQueryParameterTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest.testJPQLWithTypedParameterValue(io.hypersistence.utils.hibernate.type.array.BindArrayTypeQueryParameterTest)
[ERROR]   Run 1: BindArrayTypeQueryParameterTest.init:58->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: BindArrayTypeQueryParameterTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.DefaultEmptyListArrayTypeTest.testEmptyArrays(io.hypersistence.utils.hibernate.type.array.DefaultEmptyListArrayTypeTest)
[ERROR]   Run 1: DefaultEmptyListArrayTypeTest.init:56->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: DefaultEmptyListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer ...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest)
[ERROR]   Run 1: EhcacheListArrayTypeTest.init:59->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: EhcacheListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Canno...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest.testEmptyArrays(io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest)
[ERROR]   Run 1: EhcacheListArrayTypeTest.init:59->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: EhcacheListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Canno...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest.testMixingNullValues(io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest)
[ERROR]   Run 1: EhcacheListArrayTypeTest.init:59->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: EhcacheListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Canno...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest.testNullArrays(io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest)
[ERROR]   Run 1: EhcacheListArrayTypeTest.init:59->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: EhcacheListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Canno...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest.testNullValues(io.hypersistence.utils.hibernate.type.array.EhcacheListArrayTypeTest)
[ERROR]   Run 1: EhcacheListArrayTypeTest.init:59->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: EhcacheListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Canno...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest)
[ERROR]   Run 1: ListArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invok...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest.testAttributeType(io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest)
[ERROR]   Run 1: ListArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invok...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest.testEmptyArrays(io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest)
[ERROR]   Run 1: ListArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invok...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest.testMixingNullValues(io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest)
[ERROR]   Run 1: ListArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invok...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest.testNullArrays(io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest)
[ERROR]   Run 1: ListArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invok...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest.testNullValues(io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest)
[ERROR]   Run 1: ListArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invok...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest.testScalarEnumArray(io.hypersistence.utils.hibernate.type.array.ListArrayTypeTest)
[ERROR]   Run 1: ListArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: ListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot invok...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.MappedSuperclassListArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.MappedSuperclassListArrayTypeTest)
[ERROR]   Run 1: MappedSuperclassListArrayTypeTest>AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: MappedSuperclassListArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.MatrixArrayTypeTest.testEmptyArray(io.hypersistence.utils.hibernate.type.array.MatrixArrayTypeTest)
[ERROR]   Run 1: MatrixArrayTypeTest>AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: MatrixArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot inv...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.MatrixArrayTypeTest.testNonEmptyArray(io.hypersistence.utils.hibernate.type.array.MatrixArrayTypeTest)
[ERROR]   Run 1: MatrixArrayTypeTest>AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: MatrixArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot inv...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.MultiDimensionalArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.MultiDimensionalArrayTypeTest)
[ERROR]   Run 1: MultiDimensionalArrayTypeTest.init:47->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: MultiDimensionalArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer ...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.MultiDimensionalIntegerArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.MultiDimensionalIntegerArrayTypeTest)
[ERROR]   Run 1: MultiDimensionalIntegerArrayTypeTest>AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: MultiDimensionalIntegerArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.MultiDimensionalStringArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.MultiDimensionalStringArrayTypeTest)
[ERROR]   Run 1: MultiDimensionalStringArrayTypeTest>AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: MultiDimensionalStringArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.PostgreSQLEnumArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.PostgreSQLEnumArrayTypeTest)
[ERROR]   Run 1: PostgreSQLEnumArrayTypeTest.init:44->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: PostgreSQLEnumArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Ca...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.PostgreSQLEnumArrayTypeTest.testSetParameterWithType(io.hypersistence.utils.hibernate.type.array.PostgreSQLEnumArrayTypeTest)
[ERROR]   Run 1: PostgreSQLEnumArrayTypeTest.init:44->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: PostgreSQLEnumArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Ca...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.PostgreSQLEnumArrayTypeTest.testTypedParameterValue(io.hypersistence.utils.hibernate.type.array.PostgreSQLEnumArrayTypeTest)
[ERROR]   Run 1: PostgreSQLEnumArrayTypeTest.init:44->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: PostgreSQLEnumArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Ca...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.PostgreSQLMultipleEnumArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.PostgreSQLMultipleEnumArrayTypeTest)
[ERROR]   Run 1: PostgreSQLMultipleEnumArrayTypeTest.init:55->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: PostgreSQLMultipleEnumArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.SimpleArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.SimpleArrayTypeTest)
[ERROR]   Run 1: SimpleArrayTypeTest.init:50->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: SimpleArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot inv...
[INFO]
[ERROR] io.hypersistence.utils.hibernate.type.array.WrapperArrayTypeTest.test(io.hypersistence.utils.hibernate.type.array.WrapperArrayTypeTest)
[ERROR]   Run 1: WrapperArrayTypeTest.init:44->AbstractHibernateTest.init:101->AbstractHibernateTest.newEntityManagerFactory:261 » Persistence
[ERROR]   Run 2: WrapperArrayTypeTest>AbstractHibernateTest.destroy:119 » NullPointer Cannot in...
[INFO]
[ERROR]   Iso8601MonthTest.test:49->AbstractHibernateTest.doInJPA:491->lambda$test$2:59 » Hibernate
[ERROR]   GenericMySQLRegisterJsonTypeTest.testBulkUpdateJpqlQuery:116->AbstractHibernateTest.doInJPA:491->lambda$testBulkUpdateJpqlQuery$4:127 » Hibernate
[INFO]
[ERROR] Tests run: 254, Failures: 0, Errors: 34, Skipped: 4

The problem seems to be in Hibernate since any UserType is now registered as a CustomType that cannot be cast to BasicPluralType.

You could add a Hibernate JIRA issue for this as there may be devs interested in supplying their own custom UserType that's meant to be a plural type.

@adrianAzoitei
Copy link
Author

Thanks for the suggestion, @vladmihalcea. Spent some time trying to figure out if we can work around this issue in this library, but didn’t manage to come up with something. Do you think that’s possible?

If not, what’s your take? Postpone hypersistence-utils-64? Release it without array support?

@vladmihalcea
Copy link
Owner

vladmihalcea commented Dec 23, 2023

You should open a Hibernate issue about this since it's because of the changes in Hibernate 6.4 that UserType can no longer be used for plural types.

After you create the issue, you can discuss it on the Hibernate Forum.

Afterward, if Hibernate 6.4 will allow a UserType to be used as a PluralType, then it will be possible to port the library to 6.4.

@DManstrator
Copy link

For the record:

(I also stumbled upon this issue and had to search for those to see if there were any updates.)

@vladmihalcea
Copy link
Owner

vladmihalcea commented Jan 16, 2024

@DManstrator The link to the Hibernate forum is on the issue. This is just a Pull Request.

It's better to have all the discussions related to this topic on the issue, and not on the Pull Request.

@adrianAzoitei
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Hibernate 6.4
3 participants