You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/12/16 15:03:00 UTC
DO NOT REPLY [Bug 15397] New: -
class loader problem with javamail and tomcat 4.1.12
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15397>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15397
class loader problem with javamail and tomcat 4.1.12
Summary: class loader problem with javamail and tomcat 4.1.12
Product: Tomcat 4
Version: 4.1.12
Platform: Sun
OS/Version: Other
Status: NEW
Severity: Minor
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: fred@stsci.edu
I upgraded from 4.0.6 to 4.1.12 and now java mail throws an "invalid protocol"
error when trying to get the Transport. This problem does not occur with 4.0.6.
If I include a private copy of mail.jar in the webapp the problem goes away in
4.1.12, so I assume the problem is related to sharing the one in common/lib.
Example code:
public static synchronized Session getSession() {
if(session == null) {
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", "random smtp host");
session = Session.getDefaultInstance(props);
}
return session;
}
The line that fails:
Transport t = getSession().getTransport();
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>