javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com))

Sakai JIRA | Ivan Masár | 10 months ago
  1. 0

    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) ...

    Sakai JIRA | 10 months ago | Ivan Masár
    javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com))
  2. 0

    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) ...

    Sakai JIRA | 10 months ago | Ivan Masár
    javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unknown SMTP host: smtp.example.com (java.net.UnknownHostException: smtp.example.com))
  3. 0

    [Tomcat-users] javax.mail.SendFailedException: Sending failed - Grokbase

    grokbase.com | 3 months ago
    javax.mail.SendFailedException: 550 5.7.1 <test@test.com>... Relaying denied
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Send failure (javax.mail.MessagingException: Unable to obtain SASL authenticator)

    Stack Overflow | 2 years ago | Ajay
    javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unable to obtain SASL authenticator)
  6. 0

    Using OAuth SMTP to send mails without losing access to Google App Engine Mail

    Stack Overflow | 2 years ago | ArjunKumar
    javax.mail.SendFailedException: Send failure (com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1 (java.net.SocketException: Permission denied: Attempt to access a blocked recipient without permission.))

  1. abrazeneb 20 times, last 5 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. JavaMail API
    Transport.send
    1. javax.mail.Transport.send(Transport.java:163)
    2. javax.mail.Transport.send(Transport.java:48)
    2 frames
  3. DSpace Kernel :: API and Implementation
    Email.send
    1. org.dspace.core.Email.send(Email.java:360)
    1 frame
  4. org.dspace.app
    InternalErrorServlet.doGet
    1. org.dspace.app.webui.util.UIUtil.sendAlert(UIUtil.java:462)
    2. org.dspace.app.webui.servlet.InternalErrorServlet.doGet(InternalErrorServlet.java:54)
    2 frames