-
Notifications
You must be signed in to change notification settings - Fork 75
Description
When using riptide-soap
together with retries from riptide-failsafe
in Java 11 on a packaged Spring Boot jar, the call fails with javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
despite the correct JARs being in the classpath.
Description
In this specific combination:
riptide-soap
riptide-failsafe
with retries enabled- Java 11
- Packaged spring boot jar
The call to create a JAXBContext
with the aforementioned message. If retries are disabled, everything works as expected.
The root cause of the issue seems like that Failsafe is using ForkJoinPool.commonPool()
internally, resulting us in hitting spring-projects/spring-boot#15737.
Possible Fix
I can think of two options:
- Explicitly passing the current class' class loader to
JAXBContext.newInstance()
. This requires us to switch to creatingJAXBContext
withcontextPath
instead of the class to be bound. - Explicitly supplying an
Executor
to Failsafe that creates threads with the proper context class loader.
I don't know which of these options is better, but I'd be happy to implement the change if there is some consensus.
Steps to Reproduce
I can provide a sample project if needed
Your Environment
- Version used: 3.0.0-RC.14