Error when sending Mail

3,472 views
in my context.xml I have below entry but only thing is I have some special characters in my password
Resource
name="mail/GanibSession"
type="javax.mail.Session"
auth="Container"
mail.smtp.host="localhost"
mail.smtp.auth="true"
mail.user="xxxxx@xxxxxx.com"
mail.password="xxxxxxxxx"
mail.smtp.port="25"
mail.transport.protocol="smtp"
mail.debug="true"/

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
2014-01-17 19:41:57,807 WARN  com.ganib.notification.Email - Unable to send email.
javax.mail.AuthenticationFailedException: failed to connect, no password specified?
        at javax.mail.Service.connect(Service.java:329)
        at javax.mail.Service.connect(Service.java:176)
        at javax.mail.Service.connect(Service.java:125)
        at javax.mail.Transport.send0(Transport.java:194)
        at javax.mail.Transport.send(Transport.java:124)
        at com.ganib.notification.Email.send(Email.java:269)
        at com.ganib.notification.EmailDeliverable.deliver(EmailDeliverable.java:121)
        at com.ganib.notification.Postman.deliver(Postman.java:185)
        at com.ganib.notification.NotificationManager.deliverImmediately(NotificationManager.java:178)
        at com.ganib.notification.ImmediateNotification.post(ImmediateNotification.java:96)
        at com.ganib.resource.SpaceInviteNotification.post(SpaceInviteNotification.java:195)
        at com.ganib.resource.SpaceInvitationProcessor.createNotifications(SpaceInvitationProcessor.java:735)
        at com.ganib.resource.SpaceInvitationProcessor.inviteAll(SpaceInvitationProcessor.java:218)
        at com.ganib.resource.SpaceInvitationManager.commit(SpaceInvitationManager.java:507)
        at com.ganib.view.pages.directory.AddResponsibility.commitChanges(AddResponsibility.java:266)
        at com.ganib.view.pages.directory.AddResponsibility.onAction(AddResponsibility.java:204)
        at com.ganib.view.pages.directory.AddResponsibility.dispatchComponentEvent(AddResponsibility.java)
        at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902)
        at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
        at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
        at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
        at $ComponentEventRequestHandler_143a0896a12.handle($ComponentEventRequestHandler_143a0896a12.java)
        at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
        at $ComponentEventRequestHandler_143a0896a12.handle($ComponentEventRequestHandler_143a0896a12.java)
        at org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75)
        at $ComponentEventRequestHandler_143a0896a12.handle($ComponentEventRequestHandler_143a0896a12.java)
        at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164)
        at $ComponentEventRequestHandler_143a0896a12.handle($ComponentEventRequestHandler_143a0896a12.java)
        at $ComponentEventRequestHandler_143a08968a6.handle($ComponentEventRequestHandler_143a08968a6.java)
        at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
        at $ComponentRequestHandler_143a089689b.handleComponentEvent($ComponentRequestHandler_143a089689b.java)
        at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
        at $Dispatcher_143a089689d.dispatch($Dispatcher_143a089689d.java)
        at $Dispatcher_143a0896892.dispatch($Dispatcher_143a0896892.java)
        at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
        at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
        at $RequestHandler_143a0896893.service($RequestHandler_143a0896893.java)
        at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
        at $RequestHandler_143a0896893.service($RequestHandler_143a0896893.java)
        at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
        at $RequestHandler_143a0896893.service($RequestHandler_143a0896893.java)
        at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
        at $RequestHandler_143a0896893.service($RequestHandler_143a0896893.java)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
        at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
        at $RequestHandler_143a0896893.service($RequestHandler_143a0896893.java)
        at $RequestHandler_143a0896889.service($RequestHandler_143a0896889.java)
        at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)
        at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
        at $HttpServletRequestHandler_143a089688b.service($HttpServletRequestHandler_143a089688b.java)
        at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
        at $HttpServletRequestHandler_143a089688b.service($HttpServletRequestHandler_143a089688b.java)
        at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
        at $HttpServletRequestFilter_143a0896888.service($HttpServletRequestFilter_143a0896888.java)
        at $HttpServletRequestHandler_143a089688b.service($HttpServletRequestHandler_143a089688b.java)
        at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
        at $HttpServletRequestHandler_143a089688b.service($HttpServletRequestHandler_143a089688b.java)
        at $HttpServletRequestHandler_143a0896885.service($HttpServletRequestHandler_143a0896885.java)
        at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
        at com.ganib.hibernate.util.CustomTapestryFilter.doFilter(CustomTapestryFilter.java:134)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.ganib.security.SecurityFilter.doFilter(SecurityFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.ganib.security.SessionAccessFilter.doFilter(SessionAccessFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardW
asked Jan 17, 2014 by suman5u (120 points)

1 Answer

0 votes
Please replace your Resource tag with below @ Context.xml
<Resource name="mail/GanibSession"
     type="javax.mail.Session"
     auth="Container"
     mail.smtp.host="xxxx.xxxx.xxxx"
     mail.smtp.auth="true"
     mail.smtp.user="xxxx@xxxxxx.xxx"
     password="xxxxxxxx"
     mail.smtp.port="25"
     mail.transport.protocol="smtp"
     mail.debug="true"

Jaclyn

Jaclyn N,
Ganib Support Team, Ganib Inc.
Free Signup | Free Download | Documentation
Skype ID: ganib.support
Email: support@ganib.com

 

answered Jan 20, 2014 by Jaclyn (18,310 points)
...