-
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
ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory when using jaxb for native image #5558
Comments
Any chance you could show me the sources of the reproducer? What I'm wondering is if you are using annotations to declare your JAXB entities? Or if maybe the JAXB entities are in a separate module that is not included in the Jandex index? |
You can find the code here https://github.com/chriskn/data.provider.static |
I fixed the first issue, it was an easy one. But I stumbled upon another one that is a bit harder to diagnose/fix. I'll let you know when I come up with something. |
@chriskn btw, you should remove all the |
@gsmet thank you for the fast reply and fix! I will remove the properties. I just added them for testing. |
Describe the bug
I try to desirialize xml content based on quarkus-jaxb and a set of classes generated from schema. When I run my service in jvm mode everything work as expected. When I run it in native mode the ContextCactory can't be found. The issue persists even when I set
javax.xml.bind.context.factory
property. Stack trace:I work on windows and build the native image inside the docker container using the following commands:
To Reproduce
docker run -i --rm -p 8080:8080 incck/static-provider
Environment (please complete the following information):
uname -a
orver
: Windows 10java -version
: java version "1.8.0_231"Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
Additional context
Maven dependencies:
The text was updated successfully, but these errors were encountered: