Skip to content
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

ical native build failure #5099

Closed
JiriOndrusek opened this issue Jul 17, 2023 · 1 comment
Closed

ical native build failure #5099

JiriOndrusek opened this issue Jul 17, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@JiriOndrusek
Copy link
Contributor

Description

Upgrade of ical4j in camel (see commit) is causing an error during native execution:

UnresolvedElementException: Discovered unresolved method during parsing: net.fortuna.ical4j.validate.schema.JsonSchemaValidator.<init>(java.net.URL). This error is reported at image build time because class net.fortuna.ical4j.validate.schema.SchemaValidatorFactory is registered for linking at image build time by command line

It is unclear to me, why the error is happening, because the Quarkus knows this class.

I noticed, that this method is not visited during Camel or Camel Quarkus tests execution. Therefore it might be possible, that the method is not needed for the Camel/camel quarkus, I fixed the problem temporarily by the workaround (substitution of the method). It would be nice to investigate the problem more and if it is possible to trigger this validation from Camel/Camel Quarkus -> the case should be covered by the tests.

@jamesnetherton
Copy link
Contributor

It likely happens because com.github.erosb:everit-json-schema is declared as runtime scope and optional.

We could make the method substitution conditional based on the presence of some class in everit-json-schema.

Example of how I did something similar for another extension here #4926.

@jamesnetherton jamesnetherton changed the title [camel-main] DataFormat native failure ical native build failure Jul 31, 2023
@jamesnetherton jamesnetherton added bug Something isn't working and removed housekeeping labels Jul 31, 2023
@jamesnetherton jamesnetherton self-assigned this Jul 31, 2023
@jamesnetherton jamesnetherton added this to the 3.0.0 milestone Jul 31, 2023
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants