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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to