views:

184

answers:

1

I have a very large project with a ton of dependancies, and am getting the following exception when trying to send mail:

javax.mail.NoSuchProviderException: smtp

I know the code works because it is part of a library that is used in other projects. Does anyone know what would cause this exception to happen? I have looked through all of the jar's and the only one containing 'javax.mail' is 'mail-1.4.4-SNAPSHOT.jar'.

Is there some file/class that registeres the 'smtp' protocol, and it could be happening somewhere else in my classpath?

A: 

The way I have fixed this was to remove the mail jar from the classpath. Somewhere in the classpath there exists another instance of mail.jar, and I have yet been able to find it. If anyone else runs into this problem, additional information on trouble shooting can be found here:

http://forum.springsource.org/showthread.php?t=90737 and http://forums.sun.com/thread.jspa?threadID=5442371

wuntee