Best to make everything use the versions cxf uses
https://search.maven.org/artifact/org.apache.cxf/cxf-parent/3.4.4/pom
<cxf.jakarta.jwsapi.version>2.1.0</cxf.jakarta.jwsapi.version>
<dependency>
<groupId>jakarta.jws</groupId>
<artifactId>jakarta.jws-api</artifactId>
<version>${cxf.jakarta.jwsapi.version}</version>
</dependency>
Which is still javax.*
On Wed, 8 Sept 2021 at 17:33, Peter van der Post
<[email protected]> wrote:
>
> I’m in the process of upgrading an application from Java 8 to 11, because it
> requires Apache Wicket 9.
> Application (libraries) uses Apache CXF 3.4.4
>
> WebService classes are generated from WSDL and are based on
> jakarta.jws.WebService.
> Web service client classes are instantiated with Spring using the
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean class. This throws an exception:
>
> org.springframework.beans.MethodInvocationException: Property 'serviceClass'
> threw exception; nested exception is java.lang.NoClassDefFoundError:
> javax/jws/WebService
>
> Based on the 3.4.4 notes on Java 11 support I had expected that the
> JaxWsProxyFactoryBean class would lean on jakarta.jws.WebService instead of
> javax.jws.WebService. This does not seem to be the case given the error
> message.
>
> What am I missing here? What should be my next step?
>
> thanks for your time,
> Peter