Hi Vladimir, sadly without hacks JAXB must be in the same classloader than CXF for it to work I'm not sure how you do use meecrowave - I always use as a lib in my project to use a flat classpath and jib and rarely the webapp mode but it should be a matter of adding the jaxb stack in the lib/ directory of meecrowave if you do use the distribution mode
Romain Manni-Bucau @rmannibucau <https://x.com/rmannibucau> | .NET Blog <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064> Javaccino founder (Java/.NET service - contact via linkedin) Le dim. 9 nov. 2025 à 21:23, vladimir dvorak <[email protected]> a écrit : > Hi all, > > I’d like to share an issue I’ve encountered when using Meecrowave > 2.0.0-SNAPSHOT with JAXB/activation on recent JDKs. > > In our projects we run CXF / JAX-RS with JAXB on Meecrowave. What I’ve > found is that having the following dependencies only in the webapp is not > sufficient: > > <dependency> > <groupId>jakarta.activation</groupId> > <artifactId>jakarta.activation-api</artifactId> > </dependency> > > <dependency> > <groupId>jakarta.xml.bind</groupId> > <artifactId>jakarta.xml.bind-api</artifactId> > <version>4.0.0</version> > </dependency> > > <dependency> > <groupId>org.glassfish.jaxb</groupId> > <artifactId>jaxb-runtime</artifactId> > <version>4.0.5</version> > </dependency> > > If jakarta.activation-api (and similarly JAXB) is not present directly in > Meecrowave’s own classpath (i.e. where CXF / JAXB are actually running, not > just in the webapp), I get: > > java.lang.ClassNotFoundException: jakarta.activation.DataSource > at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown > Source) > at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown > Source) > at java.base/java.lang.ClassLoader.loadClass(Unknown Source) > at > org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:463) > ... > at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:605) > > From what I can see, CXF/JAXB appears to be loaded by the Meecrowave > (AppClassLoader) and does not see libraries from the webapp classloader. > > In the past this wasn’t an issue because JAXB was part of the JDK and > therefore visible to the AppClassLoader by default. > > As a workaround I built a custom Meecrowave with the above dependencies > added directly to meecrowave-core’s pom.xml. With that change, the > application works fine. > > I sending link our project, that can be used as reproducer (docker img > uses patched MW) > https://github.com/udger/udger-local-api-v4 > > It runs via Docker: > > ./buildAndRun.sh > > And you can trigger the failing endpoint with: > > curl -X POST -H "Content-Type: application/xml" -d '<parseUaV4Request> > <uaString></uaString> > <secChUa>" Not;A Brand";v="99", "Google Chrome";v="97", > "Chromium";v="97"</secChUa> > <secChUaFullVersionList></secChUaFullVersionList> > <secChUaMobile>?0</secChUaMobile> > <secChUaFullVersion>"97.0.4692.71"</secChUaFullVersion> > <secChUaPlatform></secChUaPlatform> > <secChUaPlatformVersion></secChUaPlatformVersion> > <secChUaModel></secChUaModel> > </parseUaV4Request>' \ > http://localhost:8080/udger-local-api-v4/parse/ua-v4 > > Thanks a lot for any guidance, and of course for all the work on > Meecrowave and OWB ! > > Best regards, > Vladimir Dvorak > >
