Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with NoClassDefFoundError


Below is the problem that I am encountering. Any help or suggestions will be greatly appreciated. Thank you very much.


I have 2 local components :

1) wd_mail : Have 2 java classes , and (The classes were from some forumer in SDN ). A wd_sendmail_pp as been exposed as a public part which containes the above 2 classes.

2) wd_main : Declares wd_sendmail_pp as a used DC.


When I deploy and run wd_main, I get the dump below. It seems that the SendMailException cannot be 'seen' by wd_main.

Here is the code:

try {

Properties p = new Properties();

Email mail = Email.getEmailInstance(p);



mail.setSubject("Test mail");

mail.setMessages(new String[] { "As above ..... " });


wdComponentAPI.getMessageManager().reportSuccess("Email sent.");

} catch (SendMailException e) {

// TODO Auto-generated catch block



I took the same piece of code and added to the wdDoInit of component controller in wd_mail and it works perfectly.

<u>Error Stack</u>

#... 42 more

Caused by: java.lang.NoClassDefFoundError: com/sap/commons/sendmail/SendMailException



Kwok Wei

Former Member
Not what you were looking for? View more on this topic or Ask a question