-
Notifications
You must be signed in to change notification settings - Fork 90
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
org.hibernate.DuplicateMappingException in packaged JAR #258
Comments
I guess that annotation scanning picks up the ValuesEntity class from blaze-persistence-core-impl.jar but the integration tries to also add it. You could workaround that for now by declaring the classes explicitly and disable scanning by setting exclude-unlisted-classes to true in your persistence.xml |
That means I have to add all of my |
Yes unfortunately. |
I changed my
|
What kind of custom Hibernate version are you using? ^^ |
Unless my |
|
Apparently the version is read from the manifest which is removed when using fat jar. |
Any idea how I could infer the version in the fat jar case? |
Currently trying to research that, maybe I can somehow include it in my own |
After a bit of research I have come to the conclusion that this is impossible. If That still leaves the issue |
Apparently this changed recently: hibernate/hibernate-orm@015be3d#diff-197d2841569f03ef77fff9b387e93425 |
Maybe I can get them to fix that for 5.2.3 |
Too bad, they are just about to release 5.2.3 so fat-jar support will have to wait for at least 5.2.4. |
Just as a side note, it doesn't look like the Hibernate team is going to fix this anytime soon. As a workaround you could try to give implementing #274 a shot which would be a good workaround I guess. |
If I package my application to a JAR, start up fails with a
org.hibernate.DuplicateMappingException
, even though it runs just fine from my IDE.My entities and
persistence.xml
live in adomain
module, that is included in my application'spom.xml
file.blaze-persistence
is then loaded as a transitive dependency fromdomain
. I am using the configuration from theREADME.md
:When I run the application from the JAR, using
java -classpath target/core-full.jar com.pallasathenagroup.portal.core.Iris
the application fails with:Any idea what could cause this issue?
The text was updated successfully, but these errors were encountered: