You are pulling the wrong version of OverlayW3CDOMStreamWriter .
SAAJStreamWriter extends OverlayW3CDOMStreamWriter , which has an isOverlaid field.
isOverlaid was changed from a closed package to a protected one in version 3.2 and was sent back to version 3.1.7 so that it can be accessed in a subclass of SAAJStreamWriter
Both of the following dependencies pull the cxf core, which has OverlayW3CDOMStreamWriter
one.
<dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-spring-boot-starter-jaxws</artifactId> <version>3.1.11</version> </dependency>
cxf-rt-frontend-jaxws - cxf-rt-bindings-soap - 3.1.11 for SAAJStreamWriter
cxf-rt-transports-http - cxf-core - 3.1.11 for OverlayW3CDOMStreamWriter
2.
<dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>3.1.6</version> </dependency>
cxf-rt-transports-http - cxf-core - 3.1.6 for OverlayW3CDOMStreamWriter
cxf core 3.1.6 was chosen compared to 3.1.11, since it is closer by default. maven resolves version conflicts with the strategy of near victories.
So essentially 3.1.11 the SAAJStreamWriter class expected 3.1.11 OverlayW3CDOMStreamWriter , but found 3.1.6 OverlayW3CDOMStreamWriter , where isOverlaid was a closed package and was the cause of your error.
Correct change to use 3.1.11 for a berth dependency, or at least use version 3.1.7 for both dependencies.
<dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>3.1.11</version> </dependency>
This will pull out 3.1.11 to bind cxf core and cxf and should fix the error.
Veeeram
source share