Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-43358

Upgrading Confluence recreates the mail-x.x.x.jar file that is *moved* when creating a JNDI Connection.

    XMLWordPrintable

Details

    Description

      Summary

      Upgrading Confluence recreates the mail-x.x.x.jar file that is moved when creating a JNDI Connection.

      As explained on Setting Up a Mail Session for the Confluence Distribution, you need to ensure that you move (don't copy) mail-x.x.x.jar from <confluence-install>\confluence\WEB-INF\lib to <confluence-install>\lib (x.x.x. represents the version numbers on the jar files in your installation).

      When you upgrade Confluence, the mail-x.x.x.jar file is recreated/kept in the installation folder. This causes issues when since email will not be sent when both files are in place.

      Steps to Reproduce

      1. Set up a JNDI SMTP connection
      2. Upgrade Confluence manually
      3. Notice the upgrade tasks do not remove the mail-x.x.x.jar

      Expected Results

      The upgrade should check to see if there is a JNDI connection originally and remove the mail-x.x.x.jar file

      Actual Results

      The below exception is thrown in the atlassian-confluence.log file:

      An error has occurred with sending the test email:
      java.lang.IllegalArgumentException: Mail server at location [java:comp/env/mail/GmailSMTPServer] is not of required type javax.mail.Session.
      

      Workaround

      The workaround is detailed in the guide Mail server at location is not of required type javax.mail.Session.

      1. Shutdown Confluence
      2. Delete the mail-x.x.x.jar from <confluence-install>\confluence\WEB-INF\lib (x.x.x. represents the version numbers on the jar files in your installation)
      3. Restart Confluence and attempt to reconfigure your mail server again.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ajean Andy J.
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: