Jakarta Data with Hibernate fails deploy in EJB Module #25548
-
Hello everyone https://github.com/apuntesdejava/example-jakarta-data/tree/review/glassfish However, when I try to use it in an EJB module using the same configuration, I get the following error.
Here's the source code. https://github.com/apuntesdejava/hexagonal-jakartaee-reservations-project/tree/feature/jakarta-data Can anyone give me a hint on how to fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I added this dependency,
and it still shows the following error.
I think it's at the Hibernate level, because the error appears here: It's still weird though: it works when it's a Web Module, but not when it's an EJB Module. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the rapport! I'll try to see if I can find something. Do note though that the current "trick" with Hibernate in the .war module was specifically designed to only pass the TCK. Because it uses this tricks for adding itself build-time to a war, it might not be so strange it has issues in other archives (which the TCK doesn't require) We are working on more stable solution based on JNoSQL (with obviously support for Jakarta Persistence), which is almost complete. |
Beta Was this translation helpful? Give feedback.
-
The NoClassDefFoundError errors are probably related to how classloading works in GlassFish for EARs. In a WAR, the classloader hierarchy is much simpler than in EARs. If you fixed the first issue by adding |
Beta Was this translation helpful? Give feedback.
The NoClassDefFoundError errors are probably related to how classloading works in GlassFish for EARs. In a WAR, the classloader hierarchy is much simpler than in EARs.
If you fixed the first issue by adding
hibernate-commons-annotations
, then you probably need to add another hibernate dependency which contains theMetadataProvider
class.