-
Bug
-
Resolution: Done
-
Minor
-
7.1.0.Final
My web application contains Seam 2.2.2, which has a META-INF/javamail.providers.
In javax.mail.Session.loadProviders(Class cl):
loadAllResources("META-INF/javamail.providers", cl, loader);
=> load Seam 2.2.2's mock provider.
loadResource("/META-INF/javamail.default.providers", cl, loader);
=> should load Java Mail's default providers, but given class is org.jboss.as.mail.extension.MailSessionService$PasswordAuthentication, which has no access to java mail's META-INF
if (providers.size() == 0) pr("DEBUG: failed to load any providers, using defaults");
=> unfortunately, Seam's mock loader has been loaded, and no default will be loaded.
Then, using Java Mail I get:
javax.mail.NoSuchProviderException: No provider for smtp
at javax.mail.Session.getProvider(Session.java:464) [mail-1.4.4.jar:1.4.4]
at javax.mail.Session.getTransport(Session.java:659) [mail-1.4.4.jar:1.4.4]
at javax.mail.Session.getTransport(Session.java:640) [mail-1.4.4.jar:1.4.4]
at javax.mail.Session.getTransport(Session.java:626) [mail-1.4.4.jar:1.4.4]