Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

help with NoClassDefFound Error ????

807606Mar 23 2007 — edited Mar 23 2007
I'm getting the following error during runtime, and I can't find out why ?????
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/mail/Message
        at CheckoutPanel.sendHtmlEmail(CheckoutPanel.java:233)
        at CheckoutPanel.access$200(CheckoutPanel.java:39)
        at CheckoutPanel$CartButtonHandler.actionPerformed(CheckoutPanel.java:182)
...
It is invoke in this part of the code:
import org.apache.commons.mail.HtmlEmail;
import org.apache.commons.mail.EmailException;
...

/** method to automatically send HTML Email (request for assets) */
    private void sendHtmlEmail(){      

       // Create the email message
       HtmlEmail email = new HtmlEmail();

       try{

          email.setHostName("mail.asiatype.com");       //SMTP Server Name
          email.addTo("buyer@asiatype.com", "The Buyer");   // recepient
          email.setFrom("scastro@asiatype.com", "Lem");     // sender
          email.setSubject("Requesting for the following digital assets...");

          // set the html message containing request
          email.setHtmlMsg(htmlString);

          // set the alternative message
          email.setTextMsg("Your email client does not support HTML messages");

          // send the email
          email.send();
          
        }catch(EmailException ee){
          ee.printStackTrace();
        }         
    }

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2007
Added on Mar 23 2007
2 comments
150 views