Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't instantiate simple class

 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is probably simple, but I'm trying to instantiate a class that sends an email, but I'm getting this error in my JSP when I'm trying to instantiate the class.

root cause: java.lang.NoClassDefFoundError: javax/mail/MessagingException

This error above refers, I think, to my "import javax.mail.MessagingException" line of code in the SendEmail class.

I believe my problem is that I'm missing a required library on the server since this SendEmail class works fine locally, but it's not clear which library I need to add to the server.

Can anyone please suggest what I'm missing?

Thanks very much in advance.

-- Mike
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JavaMail api. You need to obtain it from the Sun site.
 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
Isuru Sampath
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
The JavaMail api. You need to obtain it from the Sun site.


and place it in the


directory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic