Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception with root cause

 
arushi tomar
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making a registration form which works perfectly.
I have an email class which sends email properly. But what i want is when an admin registers a user, the user should get an auto generated email, so i replaced my main method with method emailMethod as follows :


and in my servlet i am doing this :
where userId and password are being saved in database upon registration.
where if result of registering a user is true then my method is being called, i am getting userId and password

but when i run my application, registration is successful but email is not being sent and i get this :

Servlet.service() for servlet [RegisterServlet] in context with path [/AWSCustomerJavaWebFinal] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: com.sun.mail.util.MailLogger at those two lines where i have written here

What can be the possible reason?
 
salvin francis
Bartender
Posts: 1339
11
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A java.lang.ClassNotFoundException is thrown when the jvm isn't able to locate a given class. Have you included the jar containing MailLogger (I think its the javax mail api) both at compile time as well as running the application ?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic