ERROR com.appiancorp.ra.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [(WorkId: 14, WorkType: [AbstractMailRequest: from=null, to=<Email>, subject=<Subject>], Response: null, ServerName: NotificationsEmail)] - Exception: javax.resource.spi.work.WorkCompletedException: com.appiancorp.process.engine.EmailBodyException: Email body failed to render … Caused by: javax.ejb.EJBException: com.appiancorp.process.engine.EmailBodyException: Email body failed to render … Caused by: javax.net.ConnectException: Connection Refused
ERROR com.appiancorp.process.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [[WorkId: 247, EngineId: notifications-email, Request: MailRequest:null as null by null, Response: null]] - Exception: javax.resource.spi.work.WorkCompletedException: java.lang.RuntimeException: Could not prepare email for: CompatibleEmailRecipients{locale=en_US, timeZone=IST, calendarId=gregorian, startPage=https://example-startpage.com/suite/tempo, emailAddresses=[a****.com]} at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: Could not prepare email for: CompatibleEmailRecipients{locale=en_US, timeZone=IST, calendarId=gregorian, startPage=https://example-startpage.com/suite/tempo, emailAddresses=[a*****.com]} ... Caused by: com.appiancorp.process.engine.EmailBodyException: Email body failed to render: MailBody{filename=/ntf/emailHtml/taskException_emailHtml.jsp} ... Caused by: java.net.SocketException: Unexpected end of file from server
This issue occurs when the application server is unable to connect to the HTTP endpoint to render the email body. This can occur when there is a mis-configuration in custom.properties or if the HTTP listener has been removed from the application server configuration.
<APPIAN_HOME>/conf/custom.properties
MAIL_SERVER_AND_PORT
MAIL_SCHEME
This article applies to all versions of Appian.
Last Reviewed: July 2022