RE: Tomcat 6.0.24 java emailing configuration problem

2012-03-26 Thread Huanyuan Sheng
Hi,

I finally figured out what went wrong. There is a third party .jar file under 
application/WEB-INF/lib. That jar file also contains javax.mail class. 

Thanks for your help.

Wayne

-Original Message-
From: Pid * [mailto:p...@pidster.com] 
Sent: Sunday, March 25, 2012 3:47 AM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.24 java emailing configuration problem

On 25 Mar 2012, at 04:03, Huanyuan Sheng hy_sh...@hotmail.com wrote:

 When I run the application the server gives the following error:

  javax.mail.Session cannot be cast to javax.mail.Session.

 No email is sent.

This is usually indicative of a classpath error - meaning that you have the 
class specified in two places on the classpath and Tomcat is selecting one of 
each, rather than the same one.

The fact that you have symlinked jars all over the place is probably not 
helping.

Download  install a fresh version from tomcat.apache.org and start over.

Make sure only one version of mail.jar exists in tomcat/lib and not anywhere 
else.


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.24 java emailing configuration problem

2012-03-25 Thread Pid *
On 25 Mar 2012, at 04:03, Huanyuan Sheng hy_sh...@hotmail.com wrote:

 When I run the application the server gives the following error:

  javax.mail.Session cannot be cast to javax.mail.Session.

 No email is sent.

This is usually indicative of a classpath error - meaning that you
have the class specified in two places on the classpath and Tomcat is
selecting one of each, rather than the same one.

The fact that you have symlinked jars all over the place is probably
not helping.

Download  install a fresh version from tomcat.apache.org and start over.

Make sure only one version of mail.jar exists in tomcat/lib and not
anywhere else.


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org