DRYD-2082: Update Hibernate#524
Merged
mikejritter merged 26 commits intoApr 14, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this do?
Why are we doing this? (with JIRA link)
Jira: https://collectionspace.atlassian.net/browse/DRYD-2082
This updates our hibernate dependencies to match those in Nuxeo. It's possible we might be able to actually move to 6 or 7, however the service won't startup until the rest of the upgrade is complete so that will have to be evaluated later.
A few notes on the changes made:
From the previous xml schema to entity migration I had hoped that field and property annotations could be used together to limit changes to other parts of the code. Unsurprisingly, this turned out not to be the case, so annotations have been moved from the getters (e.g.
getCreatedAtItem) to the field and the data type has been updated to Date. To continue to support the XML un/marshalling, I added a simple DateAdapter which uses ISO-8601 at UTC-0. The old getters and setters were then removed and replaced with their Date counterparts.We have moved from javax.xml.bind to jakarta.xml.bind, however the Hibernate version we include still uses the javax namespace. To deal with this, connection properties have been moved from
hibernate.cfg.xmltopersistence.xml, and an additional propertyhibernate.xml_mapping_enabledhas been specified to avoid loading any classes which deal with JAXB.I went through the dependencies in the pom for
authorization-mgt/importin order to try and start to clean them up a bit. I've organized them for compile/runtime requirements, and started to exclude any superfluous transitive dependencies (e.g. the nuxeo dependencies from common). TBH I'm not sure what the classpath was like previously; this is mostly the result of debugging and seeing what classes were not being found and causing exceptions.How should this be tested? Do these changes have associated tests?
For this, primary testing is that the
create_dbandimportdatabase targets complete. To do this you can follow the normal deploy steps using the application upgrade branch[services] mvn clean install -DskipTests[application] mvn clean install -DskipTests[services] ant undeploy deploy[services] ant create_db importDependencies for merging? Releasing to production?
Of course, the upgrade is still in progress.
There are some additional changes to look for but can likely be handled when we test the integration tests. For example, there are still some
hibernate.cfg.xmlfiles laying around, but they look to be unused.Has the application documentation been updated for these changes?
No
Did someone actually run this code to verify it works?
@mikejritter ran the import ant target locally