Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-5117

javamail.providers in jboss-seam.jar causes javax.mail.NoSuchProviderException in JBOSS 7.1.1.Final

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0.Final, 2.3.1.CR1, 2.3.1.Final
    • Fix Version/s: 2.3.2.CR1
    • Component/s: Core, Mail
    • Labels:
      None
    • Environment:

      Seam deployed in JBOSS 7.1.1.Final

    • Steps to Reproduce:
      Hide

      In order to work around the issue, the application has to provide a javamail.providers containing for instance:
      protocol=smtp; type=transport; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc;

      Show
      In order to work around the issue, the application has to provide a javamail.providers containing for instance: protocol=smtp; type=transport; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc;

      Description

      In JBOSS 7.1.1, in the org/jboss/as/mail module defiinition , the javax.mail.api dependency also loads the content of the META-INF.

      Since the jboss-seam.jar/META-INF/javamail.providers only specificies the mock protocotol, this triggers the following expection:

      Caused by: 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]
      at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:166) [jboss-seam-mail-2.3.0.Final.jar:2.3.0.Final]

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jbrette2 Jerome Brette
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: