DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
java.lang.NoSuchMethodException: : com.sun.mail.smtp.SMTPTransport.<init>(javax.mail.Session, javax.mail.URLName)
along with an error message indicating that the SMTP provider can't be found:
javax.mail.NoSuchProviderException: smtp
However, I found that if I compile and deploy a much more complicated application with basically the same configuration to a Tomcat server, it works as expected. This makes me suspect that the embedded server somehow contains mail.jar in its runtime classpath (I can't reference the classes in javax.mail in my project unless I include mail.jar in the classpath, so I'm positive they don't exist anywhere else in my project). But, if I remove mail.jar from the WEB-INF lib directory and try to do a Class.forName on, say, javax.mail.Address, it can't be found.
Anyone have any ideas why this works when I deploy it, but not when running within Eclipse?
Thanks,
Ryan
Hello i faced with problem:
javax.mail.NoSuchProviderException: smtp
at javax.mail.Session.getService(Session.java:798)
under running application in hosted mode. Can you give advise to me on fix this issue?
but I cant understand how to add special jar to bootstrap with gwt-maven-plugin.
I am trying this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.4.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<module>com.db.dbtracer.paymentstp.webapp.PaymentsManagementApplication</module>
<runTarget>PaymentsManagementApplication.html</runTarget>
<draftCompile>true</draftCompile>
<optimizationLevel>1</optimizationLevel>
<extraParam>true</extraParam>
<extra>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</extra>
<extraJvmArgs>-cp ${project.build.directory}/${project.build.finalName}/WEB-INF/lib/mail-1.4.4.jar -Dapp.config=${project.build.outputDirectory}/etc/localhost.properties -Dnc.log4j.configuration=file:/${project.build.outputDirectory}/etc/log4j.xml -Dlog4j.debug</extraJvmArgs>
</configuration>
</plugin>
But it’s not make sense to me.