Hello readers, Today In this article I am going to show you how to Solve – java.lang.noclassdeffounderror javax/xml/soap/soapexception error in Java. So here I will explain all the possible solutions.
Without wasting your time, Let’s start This Article to Solve This Error.
How java.lang.noclassdeffounderror javax/xml/soap/soapexception Error Occurs?
This is a common error in Java. When I am trying to run JAR file with java -jar command, but I got the following error. It looks as like below:
"exception": "java.lang.NoClassDefFoundError",
"message": "javax/xml/soap/SOAPException",
So here are all the possible solutions that I tried to fix this error.
How To Solve java.lang.noclassdeffounderror javax/xml/soap/soapexception Error?
- How To Solve java.lang.noclassdeffounderror javax/xml/soap/soapexception Error ?
To Solve java.lang.noclassdeffounderror javax/xml/soap/soapexception Error You Just need to add javax.xml.soap in pom.xml file and Now your error will be gone.
- java.lang.noclassdeffounderror javax/xml/soap/soapexception
To Solve java.lang.noclassdeffounderror javax/xml/soap/soapexception Error You Just need to add javax.xml.soap in pom.xml file and Now your error will be gone.
Solution 1: add javax.xml.soap in pom.xml
You Just need to add javax.xml.soap in pom.xml file
<!-- https://mvnrepository.com/artifact/javax.xml.soap/javax.xml.soap-api -->
<dependency>
<groupId>javax.xml.soap</groupId>
<artifactId>javax.xml.soap-api</artifactId>
<version>1.4.0</version>
</dependency>
Now, your error will be solved.
Solution 2: Add this dependency
Adding this dependency will solve the issue.
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>1.5.0</version>
</dependency>
Now, Your error will be solved.
Conclusion
In this article, we have discussed what causes the error and we have discussed ways to fix the error.
we hope this article has been informative. Thank you for reading. Kindly comment and let us know if you found it helpful.