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

Cannot load XSLT custom function from a class in the current application #3534

Open
ppalaga opened this issue Feb 8, 2022 · 1 comment
Open
Assignees

Comments

@ppalaga
Copy link
Contributor

ppalaga commented Feb 8, 2022

A followup of #3526 (comment)

There is a known limitation in #3526 that custom function classes have to be defined in a separate jar for the transformer to be able to load them. I think this is caused by the fact that TransformerFactory class is resolved using a wrong class loader around here in Camel https://github.com/apache/camel/blob/camel-3.15.0/components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java#L372
Perhaps changing that (or better making configurable) to current thread class loader could solve the problem.

Here are some changes needed to test the potential fix: https://github.com/ppalaga/camel-quarkus/commits/i3534

ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue Feb 8, 2022
@JiriOndrusek JiriOndrusek self-assigned this May 31, 2022
@JiriOndrusek
Copy link
Contributor

@ppalaga At the first glance, problem seems to be a little bit complicated.
I debugged the test for the correct behavior and problem is caused by the fact, that quarkus 's classloader bans the class from the test module in this line.
Workaround is to use quarkus.test.flat-class-path=true.

I'm investigating the reason (which at the first glance seems like a bug on quarkus or an intentional feature, which is not reflected by the test)

aldettinger added a commit to aldettinger/camel-quarkus that referenced this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants