tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Badi <>
Subject Re: Javamail exception in tomcat 7.0.11
Date Tue, 19 Jun 2012 14:40:04 GMT
On 6/19/2012 11:23 AM, Tim Watts wrote:
>> I have send mail servlet, which looks something like below,
>> >  
>> >  protected void doPost(HttpServletRequest request, HttpServletResponse
>> >  response) throws ServletException, IOException {
>> >           String emailRecipient = request.getParameter("name");
>> >        //   String emailRecipient = "xxx";
>> >            try {
>> >                Message msg = new MimeMessage(this.session);
> Looks like your mail session isn't getting initialized properly and you
> left out that piece of the puzzle.  How&  where does 'this.session' get
> set?
This was the real issue.Caught the exception now and could see the root 
cause now and fixed it.Eureka you guys are genius and eye  for detail.

One more suggestion I need, I had mail.jar/mailapi.jar/pop3.jar/smtp.jar 
all over, they were in project library, tomcat lib and I remove all 
those reference and had just mail.jar in tomcat lib,bounced the server 
many times and only after that I managed to make this work.

How do you remove safely all reference without impacting the server or 
your build script ? Do you just comment out the reference of jars or 
your physically remove them from the folder ?
Now a days quite often my build fails if I remove or other jars,so want 
to learn this trick as well.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message