-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
hibernate-orm: hbm-xml: Cannot serialise field 'scope' on object 'javax.xml.bind.JAXBElement@7d024b28' as the property is read only #22801
Comments
This looks caused by an incomplete JAXB mapping in Hibernate ORM, resulting in the use of JAXBElement where we should use a custom domain type (i.e. We'll have to fix this upstream. |
I decided to work around the problem in Quarkus in the end. See #22814. |
@yrodiere thanks for quick turn around. A Query might not be related to this.
But if I add one more hbm.xml to the config which has an entity
|
Thank you for reporting this!
Unless there's additional mapping (e.g. annotations) you didn't mention, if you use a file with only So in that case, it's perfectly normal that you cannot inject a
The "Cannot serialise field 'scope'" error has the same cause as this issue and should also be fixed by #22814. |
@yrodiere , it seems logical to enable Hibernate only if there any Entities available. I tried the fix out and it has resolved all issues related to JAXBElement. I was try to build the project with large subset of entities that we have around 2K+ entities and it failed with exception
Is there a workaround for this? |
Please do: this is unlikely to be related to Hibernate ORM itself. |
Describe the bug
If we have any filter-def tag as part of hbm.xml than we get below exception while building project.
Expected behavior
Project should build successfully.
Actual behavior
Getting Exception.
How to Reproduce?
Steps to Reproduce:
Output of
uname -a
orver
Linux ubuntu 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.18.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Additional information
No response
The text was updated successfully, but these errors were encountered: