Bug 463953 - problem with default javamail configuration
problem with default javamail configuration
Product: Fedora
Classification: Fedora
Component: javamail (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Fernando Nasser
Depends On:
  Show dependency treegraph
Reported: 2008-09-25 13:32 EDT by Pam Callaway
Modified: 2009-01-09 02:52 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-09 02:52:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pam Callaway 2008-09-25 13:32:56 EDT
Description of problem:
Hudson (a continuous integration server) cannot send emails on Fedora 8.  This works on Windows.  The Hudson people claim it is due to broken GNU javamail.

Their issue tracker:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install and configure hudson per website instructions (https://hudson.dev.java.net/).
2. Manage Hudson -> Email Notification
3. Use gmail as the smtp provider (directions here: http://mail.google.com/support/bin/answer.py?hl=en&answer=13287)
4. Save
5. Send test email
Actual results:
javax.mail.NoSuchProviderException: smtp
	at javax.mail.Session.getService(Session.java:782)
	at javax.mail.Session.getTransport(Session.java:708)
	at javax.mail.Session.getTransport(Session.java:651)
	at javax.mail.Session.getTransport(Session.java:631)
	at javax.mail.Session.getTransport(Session.java:686)
	at javax.mail.Transport.send0(Transport.java:166)
	at javax.mail.Transport.send(Transport.java:98)
	at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:384)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:623)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:103)
	at org.kohsuke.stapler.Function.bindAndinvoke(Function.java:57)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:409)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:173)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:409)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:352)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:112)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:61)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:52)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:28)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
	at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:42)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:44)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:85)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
	at java.lang.Thread.run(Thread.java:675)

Expected results:
Email was successfully sent

Additional info:
This works on other architectures I've tried.
Comment 1 Pam Callaway 2008-09-25 14:00:39 EDT
I was able to fix this by downloading sun's jdk and using jpackage to get the sun-mail.noarch package installed.

1. get sun's jdk on your system from sun.com
2. get the jpackage.repo and install it as mentioned here for yum: http://www.jpackage.org/yum.php
3. yum install sun-mail.noarch
4. service tomcat5 restart

Poof emailing now works.
Comment 2 Fernando Nasser 2008-10-07 10:25:58 EDT
Many other things use the GNU mail to send e-mail and it works fine (we even had an AppServer product that used it, and our partners still do).  I've seen e-mails comming up from my tests myself.

You probably copied the wrong JAR. GNU mail has the mail itself in one JAR and the 4 possible providers in separate JARs, so one can add only the ones that are desired, so they can be individually fixed etc.  There is an ubber JAR with everything, it used to be named with a '-monolithic' in the name.  If there weren't changes made to the Fedora package without my knowledge it should still be there.  Try using it or adding the smtp provider to the smaller one.
Comment 3 Pam Callaway 2008-10-07 13:58:04 EDT
I did not copy any JARs, this is what came installed by default on Fedora.  The jpackage stuff fixed it.
Comment 4 Bug Zapper 2008-11-26 06:10:57 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 5 Bug Zapper 2009-01-09 02:52:48 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.