Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy can't Tomcat find SMTPTransport(Session, URLName)?
    text
    copied!<p>We've got a web application that sends mail. For some reason, an installation of it has decided that it can't find the constructor for SMTPTransport that takes (Session,URLName) arguments. </p> <p>Relevant bits of the stack trace:</p> <pre><code> javax.mail.NoSuchProviderException: Provider class does not have a constructor(Session, URLName): protocol=smtp; type=javax.mail.Provider$Type@1dedf78; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc at javax.mail.Session.getService(Session.java:499) at javax.mail.Session.getTransport(Session.java:387) at javax.mail.Session.getTransport(Session.java:347) at javax.mail.Session.getTransport(Session.java:376) at javax.mail.Transport.send(Transport.java:67) at javax.mail.Transport.send(Transport.java:48) ... Caused by: java.lang.NoSuchMethodException: com.sun.mail.smtp.SMTPTransport.&lt;init&gt;(javax.mail.Session, javax.mail.URLName) at java.lang.Class.getConstructor0(Class.java:2706) at java.lang.Class.getConstructor(Class.java:1657) at javax.mail.Session.getService(Session.java:496) ... 8 more </code></pre> <p>We've already checked that SMTPTransport does exist in the classpath (which is not surprising, since we're not getting a ClassNotFoundException), and that it is the only copy of that class in the classpath. It's in tomcat/lib. Our webapp does not include a duplicate. There is not a duplicate in $JAVA_HOME/jre/lib. </p> <p>I've even gone so far as to <em>decompile</em> the class to verify that it <em>does in fact</em> have the Constructor in question.</p> <p>I've done a bit of googling and have found other people who have <a href="http://groups.google.com/group/google-web-toolkit/browse_thread/thread/d409eca7cae99fe9" rel="noreferrer">seen the same error</a>, but no fixes for the problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload