It looks like hibernate-infinispan
is going to be deprecated and going forward we should prefer to use infinispan-hibernate-cache
:
https://github.com/hibernate/hibernate-orm/commit/25854433ac02d2d09a0ac1afddabdefe068a674e
Superficially it seems to me that things should still work as they stand, but I just encountered a pretty annoying issue of infinispan refusing to deserialize a metadata file -- which I eventually tracked down to having both infinispan-core 8.x and 9.x:
org.infinispan.commons.CacheException: Unable to load component metadata in file hibernate-infinispan-component-metadata.dat
...
org.infinispan.factories.components.ComponentMetadata$PrioritizedMethodMetadata; local class incompatible: stream classdesc serialVersionUID = 7202975262074323281, local class serialVersionUID = -7906020468335680660
The solution, at least for my problem, was to jump ahead and remove hibernate-infinispan (which pulls in infinispan 8) and replace it with infinispan-hiberate-cache (which aligns with the infinispan.version
in spring-boot-dependencies).
Not sure if this is right for everyone, but thought I might save poor sods like me some time by reporting it here.
Comment From: wilkinsona
@erikkemperman Boot doesn't do anything with hibernate-infinispan
(other than providing dependency management for it). What change were you expecting to be made to Spring Boot in response to this issue?
Comment From: erikkemperman
@wilkinsona Thanks for the quick response!
Well, I was just wondering if it would be better to have infinispan-hibernate-cache
in the managed dependencies instead of hibernate-infinispan
. I think my findings today suggest the current versions of infinispan and hibernate as managed by spring-boot don't get along well at this point (and I guess this change will happen at some point anyway, due to deprecation).
But if not that's fine, feel free to close this issue. Anyone unfortunate enough to run into the same problem should be able to find this issue and save him/herself some time.
Comment From: wilkinsona
I was just wondering if it would be better to have infinispan-hibernate-cache in the managed dependencies instead of hibernate-infinispan.
We try to provide dependency management for all of a library's modules so, while hibernate-inifinispan
remains part of Hibernate, we'll keep the dependency management for it. Adding dependency management for infinispan-hibernate-cache
sounds reasonable though as our Inifinispan dependency management is currently incomplete without it. I've opened https://github.com/spring-projects/spring-boot/issues/12526.
Comment From: erikkemperman
Fair enough, thanks!
Comment From: graham-collinson
Thanks for this report - it saved me some time!
Comment From: nenadkova
This helped me as well, except in my case it was hibernate-infiinispan including infinispan 9.3.0.Final and colliding with infinispan 9.4.18.Final. Thanks for the report!