on ‎2020 Sep 21 2:33 PM
Hi Experts,
I am trying to use webServiceTemplate for making soap based web service call but its injection is getting failed. Eventually, it is throwing below error -
Constructor threw exception; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.soap.saaj.SaajSoapMessageFactory]: Unresolvable class definition; nested exception is java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException.
After doing some analysis I found it is causing in every java version newer than Java 9 but the proposed solution is not working. Can anyone tell me what to do to resolve this issue?
Commerce/Hybris version: 2005
Java version:11
Thanks in Advance.
Request clarification before answering.
Have you added corresponding SOAP libs to the project after upgrading to the Java 11? Java EE SOAP libs were removed in J11.
See https://stackoverflow.com/questions/54573998/java-11-package-javax-xml-soap-does-not-exist
In our project we added at least these libs which added SOAP support
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>${jakarta.xml.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta.xml.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.soap</groupId>
<artifactId>jakarta.xml.soap-api</artifactId>
<version>${jakarta.xml.soap-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.jws</groupId>
<artifactId>jakarta.jws-api</artifactId>
<version>${jakarta.jws-api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>${saaj-impl.version}</version>
</dependency>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.