javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Connection error (java.io.IOException: Error connecting to smtp.gmail.com, 465))

tip

This happens when you try to instantiate a class that can't be instantiated, either because the class object is abstract, an interface, an array class, a primitive type, void, or because the class has no nullary constructor.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • [jira] [Updated] (TOMEE-1697) javamail: sending email fails
    via by Tamás Greguss (JIRA),
  • [jira] [Updated] (TOMEE-1697) javamail: sending email fails
    via by Tamás Greguss (JIRA),
  • [jira] [Commented] (TOMEE-1697) javamail: sending email fails
    via by Tamás Greguss (JIRA),
  • [jira] [Updated] (TOMEE-1697) javamail: sending email fails
    via by Tamás Greguss (JIRA),
  • [jira] [Commented] (TOMEE-1697) javamail: sending email fails
    via by Romain Manni-Bucau (JIRA),
  • [jira] [Updated] (TOMEE-1697) javamail: sending email fails
    via by Tamás Greguss (JIRA),
  • [jira] [Commented] (TOMEE-1697) javamail: sending email fails
    via by Tamás Greguss (JIRA),
  • [jira] [Commented] (TOMEE-1697) javamail: sending email fails
    via by Romain Manni-Bucau (JIRA),
    • javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Connection error (java.io.IOException: Error connecting to smtp.gmail.com, 465)) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at com.gbit.lib.GBITMail.SendWithGMailSSL(GBITMail.java:136) at com.gbit.lib.GBITMail.SendMail(GBITMail.java:103) at com.gbit.efoglalo.test.UnitTestMB.testSendingEmailOld(UnitTestMB.java:503) at com.gbit.efoglalo.test.UnitTestMB$$OwbNormalScopeProxy0.testSendingEmailOld(com/gbit/efoglalo/test/UnitTestMB.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.el.parser.AstValue.invoke(AstValue.java:278) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:273) at org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96) at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:88) at javax.faces.event.ActionEvent.processListener(ActionEvent.java:51) at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:420) at javax.faces.component.UICommand.broadcast(UICommand.java:103) at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1041) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:289) at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1415) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:765) at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:38) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.omnifaces.filter.CacheControlFilter.doFilter(CacheControlFilter.java:226) at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: javax.mail.MessagingException: Connection error (java.io.IOException: Error connecting to smtp.gmail.com, 465) at org.apache.geronimo.javamail.transport.smtp.SMTPConnection.protocolConnect(SMTPConnection.java:166) at org.apache.geronimo.javamail.transport.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:165) at javax.mail.Service.connect(Service.java:274) at javax.mail.Service.connect(Service.java:91) at javax.mail.Service.connect(Service.java:76) at javax.mail.Transport.send(Transport.java:94) ... 59 more Caused by: java.io.IOException: Error connecting to smtp.gmail.com, 465 at org.apache.geronimo.javamail.util.MailConnection.createSocketFromFactory(MailConnection.java:408) at org.apache.geronimo.javamail.util.MailConnection.createSocket(MailConnection.java:504) at org.apache.geronimo.javamail.util.MailConnection.getConnectedSocket(MailConnection.java:322) at org.apache.geronimo.javamail.util.MailConnection.getConnection(MailConnection.java:274) at org.apache.geronimo.javamail.transport.smtp.SMTPConnection.protocolConnect(SMTPConnection.java:145) ... 64 more Caused by: java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at java.lang.Class.newInstance(Class.java:442) at org.apache.geronimo.javamail.util.MailConnection.createSocketFromFactory(MailConnection.java:355) ... 68 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown User
    Unknown User178 times, last one,
    Andreas Häber
    Andreas Häber2 times, last one,
    filpgame
    filpgame8 times, last one,
    54 more bugmates