• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception with root cause

 
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?

 
Seriously Rick? Seriously? You might as well just read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic