javax.mail.SendFailedException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I encountered three distinct errors when trying to add, delete and edit a bitstream policy via JSPUI. This is on master with service-based api and reloadable configuration already merged. The first one (Add) is due to undefined SMTP server in configuration. This should trigger an error, but not an Internal Server Error. The second one (Delete) is a wrong type cast. The third one (Edit) seems related to Hibernate. ------------------------------------------------------------------ JSPUI edit item / authorizations / bitstream / add new policy 2016-02-03 13:51:04,584 WARN org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=F5C3F1F73B0FC58B8F56A3500BC637A0:internal_error:-- URL Was: https://localhost/jspui/tools/authorize -- Method: POST -- Parameters were: -- submit_bitstream_add_policy: "Add New Policy" -- bitstream_id: "0c35c224-4b95-448c-9194-34b616c75bab" -- item_id: "4dd07d56-f3d6-44ed-a037-5c6347908df8" java.lang.NullPointerException at org.dspace.core.AbstractHibernateDSODAO.addMetadataLeftJoin(AbstractHibernateDSODAO.java:48) at org.dspace.eperson.dao.impl.EPersonDAOImpl.getSearchQuery(EPersonDAOImpl.java:129) at org.dspace.eperson.dao.impl.EPersonDAOImpl.findAll(EPersonDAOImpl.java:84) at org.dspace.eperson.EPersonServiceImpl.findAll(EPersonServiceImpl.java:163) at org.dspace.app.webui.servlet.admin.AuthorizeAdminServlet.doDSPost(AuthorizeAdminServlet.java:272) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:122) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) ... at java.lang.Thread.run(Thread.java:745) 2016-02-03 13:51:05,125 WARN org.dspace.app.webui.util.UIUtil @ Unable to send email alert javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com)) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at org.dspace.core.Email.send(Email.java:360) at org.dspace.app.webui.util.UIUtil.sendAlert(UIUtil.java:462) at org.dspace.app.webui.servlet.InternalErrorServlet.doGet(InternalErrorServlet.java:54) ... Caused by: javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com) ------------------------------------------------------------------ JSPUI edit item / authorizations / bitstream / delete policy 2016-02-03 13:58:45,971 WARN org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=F5C3F1F73B0FC58B8F56A3500BC637A0:internal_error:-- URL Was: https://localhost/jspui/tools/authorize -- Method: POST -- Parameters were: -- submit_item_delete_policy: "Delete" -- bitstream_id: "0c35c224-4b95-448c-9194-34b616c75bab" -- item_id: "4dd07d56-f3d6-44ed-a037-5c6347908df8" -- policy_id: "61663" java.lang.ClassCastException: org.dspace.content.Bitstream cannot be cast to org.dspace.content.Item at org.dspace.app.webui.servlet.admin.AuthorizeAdminServlet.doDSPost(AuthorizeAdminServlet.java:294) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:122) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) ... ------------------------------------------------------------------ JSPUI edit item / authorizations / bitstream / edit policy 2016-02-03 13:59:45,028 WARN org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=F5C3F1F73B0FC58B8F56A3500BC637A0:internal_error:-- URL Was: https://localhost/jspui/tools/authorize -- Method: POST -- Parameters were: -- bitstream_id: "0c35c224-4b95-448c-9194-34b616c75bab" -- item_id: "4dd07d56-f3d6-44ed-a037-5c6347908df8" -- submit_item_edit_policy: "Edit" -- policy_id: "62920" java.lang.NullPointerException at org.dspace.core.AbstractHibernateDSODAO.addMetadataLeftJoin(AbstractHibernateDSODAO.java:48) at org.dspace.eperson.dao.impl.EPersonDAOImpl.getSearchQuery(EPersonDAOImpl.java:129) at org.dspace.eperson.dao.impl.EPersonDAOImpl.findAll(EPersonDAOImpl.java:84) at org.dspace.eperson.EPersonServiceImpl.findAll(EPersonServiceImpl.java:163) at org.dspace.app.webui.servlet.admin.AuthorizeAdminServlet.doDSPost(AuthorizeAdminServlet.java:219) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:122) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) ...
    via by Ivan Masár,
  • I encountered three distinct errors when trying to add, delete and edit a bitstream policy via JSPUI. This is on master with service-based api and reloadable configuration already merged. The first one (Add) is due to undefined SMTP server in configuration. This should trigger an error, but not an Internal Server Error. The second one (Delete) is a wrong type cast. The third one (Edit) seems related to Hibernate. ------------------------------------------------------------------ JSPUI edit item / authorizations / bitstream / add new policy 2016-02-03 13:51:04,584 WARN org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=F5C3F1F73B0FC58B8F56A3500BC637A0:internal_error:-- URL Was: https://localhost/jspui/tools/authorize -- Method: POST -- Parameters were: -- submit_bitstream_add_policy: "Add New Policy" -- bitstream_id: "0c35c224-4b95-448c-9194-34b616c75bab" -- item_id: "4dd07d56-f3d6-44ed-a037-5c6347908df8" java.lang.NullPointerException at org.dspace.core.AbstractHibernateDSODAO.addMetadataLeftJoin(AbstractHibernateDSODAO.java:48) at org.dspace.eperson.dao.impl.EPersonDAOImpl.getSearchQuery(EPersonDAOImpl.java:129) at org.dspace.eperson.dao.impl.EPersonDAOImpl.findAll(EPersonDAOImpl.java:84) at org.dspace.eperson.EPersonServiceImpl.findAll(EPersonServiceImpl.java:163) at org.dspace.app.webui.servlet.admin.AuthorizeAdminServlet.doDSPost(AuthorizeAdminServlet.java:272) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:122) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) ... at java.lang.Thread.run(Thread.java:745) 2016-02-03 13:51:05,125 WARN org.dspace.app.webui.util.UIUtil @ Unable to send email alert javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com)) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at org.dspace.core.Email.send(Email.java:360) at org.dspace.app.webui.util.UIUtil.sendAlert(UIUtil.java:462) at org.dspace.app.webui.servlet.InternalErrorServlet.doGet(InternalErrorServlet.java:54) ... Caused by: javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com) ------------------------------------------------------------------ JSPUI edit item / authorizations / bitstream / delete policy 2016-02-03 13:58:45,971 WARN org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=F5C3F1F73B0FC58B8F56A3500BC637A0:internal_error:-- URL Was: https://localhost/jspui/tools/authorize -- Method: POST -- Parameters were: -- submit_item_delete_policy: "Delete" -- bitstream_id: "0c35c224-4b95-448c-9194-34b616c75bab" -- item_id: "4dd07d56-f3d6-44ed-a037-5c6347908df8" -- policy_id: "61663" java.lang.ClassCastException: org.dspace.content.Bitstream cannot be cast to org.dspace.content.Item at org.dspace.app.webui.servlet.admin.AuthorizeAdminServlet.doDSPost(AuthorizeAdminServlet.java:294) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:122) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) ... ------------------------------------------------------------------ JSPUI edit item / authorizations / bitstream / edit policy 2016-02-03 13:59:45,028 WARN org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=F5C3F1F73B0FC58B8F56A3500BC637A0:internal_error:-- URL Was: https://localhost/jspui/tools/authorize -- Method: POST -- Parameters were: -- bitstream_id: "0c35c224-4b95-448c-9194-34b616c75bab" -- item_id: "4dd07d56-f3d6-44ed-a037-5c6347908df8" -- submit_item_edit_policy: "Edit" -- policy_id: "62920" java.lang.NullPointerException at org.dspace.core.AbstractHibernateDSODAO.addMetadataLeftJoin(AbstractHibernateDSODAO.java:48) at org.dspace.eperson.dao.impl.EPersonDAOImpl.getSearchQuery(EPersonDAOImpl.java:129) at org.dspace.eperson.dao.impl.EPersonDAOImpl.findAll(EPersonDAOImpl.java:84) at org.dspace.eperson.EPersonServiceImpl.findAll(EPersonServiceImpl.java:163) at org.dspace.app.webui.servlet.admin.AuthorizeAdminServlet.doDSPost(AuthorizeAdminServlet.java:219) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:122) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) ...
    via by Ivan Masár,
  • User cannot self-register - ForgeRock Community
    via by Unknown author,
  • GAE attaching PNG image to an email
    via Stack Overflow by Marek R
    ,
  • The following documentation appears to have some incorrect information: http://logback.qos.ch/manual/appenders.html#SMTPAppender The table includes a property named "smtpHost". Using this value results in logback ignoring the setting and attempting to send mail through localhost. The correct property name appears to be "SMTPHost". The documentation also states that the parameter is mandatory. It appears to fall back to localhost if it is not encountered (perhaps java-mail is doing that). I would assume that "smtpPort" is incorrect too based on the setter name of "SMTPPort" in SMTPAppenderBase. Log info: |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender] |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [TEST] |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@22:13 - no applicable action for [smtpHost], current pattern is [[configuration][appender][smtpHost]] |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender] ... |-ERROR in ch.qos.logback.classic.net.SMTPAppender[POR] - Error occured while sending e-mail notification. javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused)) at javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused)) at at javax.mail.Transport.send(Transport.java:163) at at javax.mail.Transport.send(Transport.java:48) at at ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:323) at at ch.qos.logback.core.net.SMTPAppenderBase.append(SMTPAppenderBase.java:181) at at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:85)
    via by Jay Taylor,
  • The following documentation appears to have some incorrect information: http://logback.qos.ch/manual/appenders.html#SMTPAppender The table includes a property named "smtpHost". Using this value results in logback ignoring the setting and attempting to send mail through localhost. The correct property name appears to be "SMTPHost". The documentation also states that the parameter is mandatory. It appears to fall back to localhost if it is not encountered (perhaps java-mail is doing that). I would assume that "smtpPort" is incorrect too based on the setter name of "SMTPPort" in SMTPAppenderBase. Log info: |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender] |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [TEST] |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@22:13 - no applicable action for [smtpHost], current pattern is [[configuration][appender][smtpHost]] |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender] ... |-ERROR in ch.qos.logback.classic.net.SMTPAppender[POR] - Error occured while sending e-mail notification. javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused)) at javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused)) at at javax.mail.Transport.send(Transport.java:163) at at javax.mail.Transport.send(Transport.java:48) at at ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:323) at at ch.qos.logback.core.net.SMTPAppenderBase.append(SMTPAppenderBase.java:181) at at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:85)
    via by Jay Taylor,
    • javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com)) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at org.dspace.core.Email.send(Email.java:360) at org.dspace.app.webui.util.UIUtil.sendAlert(UIUtil.java:462) at org.dspace.app.webui.servlet.InternalErrorServlet.doGet(InternalErrorServlet.java:54)

    Users with the same issue

    abrazeneb
    20 times, last one,
    Unknown visitor1 times, last one,