]
Tomaz Cerar reassigned AS7-3265:
--------------------------------
Assignee: Tomaz Cerar (was: David Lloyd)
Java Mail: NoSuchProviderException for any default provider with a
Seam 2 application
-------------------------------------------------------------------------------------
Key: AS7-3265
URL:
https://issues.jboss.org/browse/AS7-3265
Project: Application Server 7
Issue Type: Bug
Components: EE
Affects Versions: 7.1.0.Final
Environment: 7.1.0 Final nightly built from January 6.
Seam 2.2.2
Reporter: Philippe Guinot
Assignee: Tomaz Cerar
Priority: Minor
Labels: mail, provider, seam
My web application contains Seam 2.2.2, which has a META-INF/javamail.providers.
In javax.mail.Session.loadProviders(Class cl):
{code}loadAllResources("META-INF/javamail.providers", cl, loader);{code}
=> load Seam 2.2.2's mock provider.
{code}loadResource("/META-INF/javamail.default.providers", cl, loader);{code}
=> 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
{code}if (providers.size() == 0)
pr("DEBUG: failed to load any providers, using defaults");{code}
=> unfortunately, Seam's mock loader has been loaded, and no default will be
loaded.
Then, using Java Mail I get:
{code}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]
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: