Search code examples
versioncxfjax-wsconflict

How to solve java.lang.IncompatibleClassChangeError after CXF 3.5.3 upgrade (Java Application - JRE 8)?


Since upgrading the cxf Version used to build our Java Application from 2.7.18 to 3.5.3 we encounter the following error:

Caused by: java.lang.IncompatibleClassChangeError: class org.apache.cxf.jaxws.WrapperClassGenerator has interface org.apache.cxf.common.util.ASMHelper as super class

The super class of WrapperClassGenerator has indeed changed between older versions of cxf and version 3.5.x. but "mvn dependency:tree-Dverbose" shows only the correct CXF 3.5.3 dependencies are included in the build. Calling org.apache.cxf.version.Version.getCompleteVersionString() at runtime also shows correct version 3.5.3.

So i have no idea where that version conflict is coming from. Can it have something to do with jax-ws version supplied by the java runtime? We use Java 1.8.0_202-b08 JRE at runtime. The cxf website claims cxf 3.5.3 works with Java8. I also tried using the java endorsed mechanism to drop newer version of Jax-ws and Jaxb jars into java (and the even newer Jakarta Jars which i doubt it will even pick up...). No effect at all.

Currently running out of ideas. Has anyone had similar problems or an idea how to debug this?


Solution

  • Never mind. I just found out our application has a folder from where it supplies some additional jar files of its own during runtime. I found some ancient cxf jar files there that i somehow managed to overlook for weeks now. Dropped the correct cxf and spring jar files into that folder instead of the old ones and everything works fine now.