DevTest-CVS Monitor: Monitor with email component having attachment fails

book

Article ID: 198417

calendar_today

Updated On:

Products

CLOUDTEST CA Application Test CA Cloud Test Mobile MOBILECLOUD Service Virtualization

Issue/Introduction

Monitors with email component with attachment deployed into portal fails with below error. 
Failed to send email, error message = Cannot attach file "C:/Test_path/Finland.html"

Send Email Step : 

============================================================================


============================================================================
| Failed to send email, error message = Cannot attach file "C:/Test_pathFinland.html"
============================================================================
| Step:        Send Email Step
----------------------------------------------------------------------------
| Message:     Cannot attach file "C:/Test_path/Finland.html"
----------------------------------------------------------------------------
| Trapped Exception: Cannot attach file "C:/Test_pathFinland.html"
| Trapped Message:   org.apache.commons.mail.EmailException: Cannot attach file "C:/Test_path/Finland.html"
----------------------------------------------------------------------------
STACK TRACE
org.apache.commons.mail.EmailException: Cannot attach file "C:/Test_path/Finland.html"
 at org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:333)
 at com.itko.lisa.glass.SendEmailExecutor.sendEmail(SendEmailExecutor.java:126)
 at com.itko.lisa.glass.SendEmailStep.execute(SendEmailStep.java:123)
 at com.itko.lisa.test.TestNode.executeNode(TestNode.java:995)
 at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)
 at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
 at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
 at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1124)
 at com.itko.lisa.coordinator.Instance.run(Instance.java:208)
Caused by: java.io.IOException: "C:/Webpages_28_8/Finland.html" does not exist
 at org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:322)
 ... 8 more
============================================================================


============================================================================
| Step:        Send Email Step
----------------------------------------------------------------------------
| Message:     Cannot attach file "C:/Test_path/Finland.html"
----------------------------------------------------------------------------
| Trapped Exception: Cannot attach file "C:/Test_path/Finland.html"
| Trapped Message:   org.apache.commons.mail.EmailException: Cannot attach file "C:/Test_path/Finland.html"
----------------------------------------------------------------------------
STACK TRACE
org.apache.commons.mail.EmailException: Cannot attach file "C:/Test_path/Finland.html"
 at org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:333)
 at com.itko.lisa.glass.SendEmailExecutor.sendEmail(SendEmailExecutor.java:126)
 at com.itko.lisa.glass.SendEmailStep.execute(SendEmailStep.java:123)
 at com.itko.lisa.test.TestNode.executeNode(TestNode.java:995)
 at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)
 at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
 at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
 at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1124)
 at com.itko.lisa.coordinator.Instance.run(Instance.java:208)
Caused by: java.io.IOException: "C:/Test_path/Finland.html" does not exist
 at org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:322)
 ... 8 more
============================================================================

Environment

Release : 10.5

Component : CA Service Virtualization

Resolution

Make sure you have correct path defined on server where attachment has picked up.