When trying to load both hibernate-osgi and hibernate-java8 I get the following error:
I need to use both in my project but I cannot work around this without resorting to the shade plugin.
I stumbled upon the same issue today. Any change of publishing a full jdk8 hibernate-core artifact merged with hibernate-java8 ? I think this is the fastest way to correct this issue. OSGI users will have to resort to something like this anyway which means custom made dependencies .
I'm of course not fully aware of the implications of what I'm asking, probably this means more work than I think. Perhaps I'm missing some other way to solve this at least till a another solution is adopted ?
Brett, sorry missed your question here. If they want to use Java 8 inside the OSGi container and they want to use the Hibernate Java 8 date/time support they'd need that jar.
Ultimately we will have to split the package I think for this to work. That just sucks though because eventually this will get merged back into hibernate-orm once we move to Java 8 as the base JRE.
Ivo, it's not as simple as moving those classes into hibernate-orm as that would mean hibernate-hibernate-orm would need Java 8 at least to compile.
Hey , no sweat. So, technically, we can support "split" packages (exporting a package from multiple bundles), as long as those packages don't expose two of the same class name. It's mainly a matter of an additional instruction in the manifest. However, I'd highly advise skipping that if at all possible, as it tends to start a rabbit hole of problems. Especially if ORM 6.0 will be soonish and will natively support Java 8, I'd vote to punt on this. Just my $.02. If you guys think there's "enough" of a reason to support this in 5.x, I can play with it...
Based on the mailing list discussions and master aligning with Java 8, killing this one. Let me know if anyone disagrees.
Thats reasonable to me. Its already done in master, btw, and published already as a 6.0.0-SNAPSHOT