JMeter webservices NoClassDefFoundError: javax/mail

Using the JMeter Webservice(SOAP) request sampler requires the installation of mail.jar and activation.jar files. Those library files don't come with JMeter by default. Sending webservice requests without having these files results in an unexpected error. Many users don't know how to tackle this problem, though it's easy to fix.


If one sends a Webservice(SOAP) request with the default JMeter installation, an error is thrown: java.lang.NoClassDefFoundError: javax/mail/MessagingException. This error is visible both in Jmeter.log (located in the JMeter bin directory) and a result sampler like the View Results Tree.





The solution for this problem is to download and install the mail.jar and activiation.jar libraries. Download java mail from Sun and java activation from Sun. Extract respectively mail.jar and activiation.rar from the downloaded zip archives, and put them in your Jmeter lib folder. For instance: D:\machtst\My Documents\Tools\jakarta-jmeter-2.3.2\lib\



It's important to close JMeter and reopen it again, so JMeter can load the libraries. If you run your test again, the error should be gone.



Not the solution you were looking for? Check out the JMeter FAQ section for more JMeter solutions.

Related Posts by Categories

Comments

Recent Articles

Top Commenters

Recent Comments