You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Hendrik Saly (JIRA)" <ji...@apache.org> on 2014/11/25 22:44:13 UTC

[jira] [Commented] (GERONIMO-6519) Geronimo throws NoSuchProviderException - unable to locate mail providers (smtp, smtps, etc.)

    [ https://issues.apache.org/jira/browse/GERONIMO-6519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225256#comment-14225256 ] 

Hendrik Saly commented on GERONIMO-6519:
----------------------------------------

Reinhard, can you pls. provide more informations? See last comment, Thanks.

> Geronimo throws NoSuchProviderException - unable to locate mail providers (smtp, smtps, etc.)
> ---------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6519
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6519
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>    Affects Versions: 3.0.0, 3.0.1
>         Environment: Windows 7, JRE 7
>            Reporter: Reinhard Klemm
>            Assignee: Hendrik Saly
>
> Calls to javax.mail.Session.getTransport() throw a NoSuchProviderException, regardless of the selected provider (smtp, smtps, imap, etc.). A call to javax.mail.Session.getProviders() returns an empty list. Here is a test case:
> Properties emailServerProperties = new Properties();
> 		
> emailServerProperties.put("mail.smtps.host", smtpServerAddress);
> emailServerProperties.put("mail.smtps.port", smtpServerPort);
> emailServerProperties.put("mail.transport.protocol", "smtps");
> emailServerProperties.put("mail.smtps.auth", "true");
> 		
> emailServerSession = Session.getInstance(emailServerProperties);
> transportToEmailServer = emailServerSession.getTransport();
> The NoSuchProviderException is thrown in the last line of the code example. 
> I'm not sure whether this helps with the investigation: the above code works in IBM WebSphere CE up to version 3.0.0.3, which is based on Geronimo 3.0.0. There, it was necessary to name geronimo-javamail_1.4_mail-1.8.3.jar as a dependency and to add it to the classpath. In Geronimo 3.0.0/3.0.1, geronimo-javamail_1.4_mail-1.8.3.jar is included in the runtime and adding it to the classpath or the list of dependencies makes no difference as far as the NoSuchProviderException is concerned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)