. Advertisement .
..3..
. Advertisement .
..4..
If you have installed the latest Java version in your system and have been using it regularly, you might have come across the error messages java.lang.noclassdeffounderror javax/xml/soap/soapexception. This error is often seen as a fatal error, but can be easily rectified. Here are some simple steps to help you fix this error.
How To Fix The Error “java.lang.noclassdeffounderror javax/xml/soap/soapexception”?
When you run your applocation, you may get the following error.
“exception”: “java.lang.NoClassDefFoundError”, “message”: “javax/xml/soap/SOAPException”,
To fix the “java.lang.noclassdeffounderror javax/xml/soap/soapexception” error, simply include javax.xml.soap in the pom.xml file, and your problem will be resolved.
Option 1: Include javax.xml.soap In pom.xml
Simply include javax.xml.soap in your 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>
Option 2: Include this dependency
Including this dependency will fix the problem.
<dependency> <groupId>com.sun.xml.messaging.saaj</groupId> <artifactId>saaj-impl</artifactId> <version>1.5.0</version> </dependency>
Conclusion
We hope you enjoyed our article about the “java.lang.noclassdeffounderror javax/xml/soap/soapexception” error. We know that this issue can be frustrating to deal with, so we hope that our information has helped you fix it. If you have any other questions or concerns about working with Java, please leave a comment below. Thank you for reading; we are always excited when one of our posts can provide useful information on a topic like this!
Leave a comment