-
Notifications
You must be signed in to change notification settings - Fork 2.9k
jaxb.index not registered through quarkus-jaxb #48059
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
Comments
You added a link to a Zulip discussion, please make sure the description of the issue is comprehensive and doesn't require accessing Zulip This message is automatically generated by a bot. |
@vsevel can you please attach a sample that exhibits the problem? If we have that, it should be possible to udnerstand exactly why the current code does not handle the case in question. Thanks |
here it is: https://github.com/vsevel/quarkus_reproducers/tree/issue_48059_jaxb_native
|
🙏 |
It seems like I do wonder whether we should detect these automatically... WDYT @gsmet ? |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I have an application that contains a
org/acme/jaxb.index
and a jaxb annotatedorg.acme.Employee
class , and some code that relies on it when creating a context:this is working in jvm mode, but fails in native because the file is not registered.
in native there will be an error saying that a
jaxb.index
orObjectFactory
class are expected.Expected behavior
there should be a consistent behavior between jvm and native modes.
we should be able to register automatically
jaxb.index
either in the main module itself, or one of its dependencies.Actual behavior
How to Reproduce?
create an application with extension
quarkus-jaxb
add
src/main/resources/jaxb.index
with content:create class
org.acme.Employee
with:create endpoint:
and test:
the same test in native will fail.
Output of
uname -a
orver
No response
Output of
java -version
No response
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.22
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
I was able to fix it with this additional code in one of our extensions:
although functional, the code could probably be more efficient?
as a side note, if I did not include the
reflective
argument, then we do not enter into the build step??I looked at the jaxb processor. it has some code already to do some logic about jaxb files. but in my use case I never enter those methods because
fileRoots
is empty.and I do not see anybody creating
JaxbFileRootBuildItem
objects.see also https://quarkusio.zulipchat.com/#narrow/channel/187030-users/topic/jaxb.2Eindex.20not.20registered.20in.20native
The text was updated successfully, but these errors were encountered: