Skip to content

I am getting an error while running ANT of automation of excecute.xml

1

[echo] Clean Tomcat logs and temporary files from D:\PhotonUser\Workshop\workspace\carddemo-automation/tomcat

BUILD FAILED D:\PhotonUser\Workshop\workspace\carddemo-automation\execute.xml:25: The following error occurred while executing this line: D:\PhotonUser\Workshop\workspace\carddemo-automation\execute.xml:27: The following error occurred while executing this line: D:\PhotonUser\Workshop\workspace\carddemo-automation\execute.xml:48: The following error occurred while executing this line: D:\PhotonUser\Workshop\workspace\carddemo-automation\utils\tomcat.xml:9: The following error occurred while executing this line: D:\PhotonUser\Workshop\workspace\carddemo-automation\utils\tomcat.xml:60: Unable to delete file D:\PhotonUser\Workshop\workspace\carddemo-automation\tomcat\logs\catalina.2025-06-09.log

Total time: 11 seconds

asked a year ago118 views

1 Answer
0

The error you're encountering while running the ANT automation of execute.xml appears to be related to file access permissions or file locking issues. The build is failing because it's unable to delete the Tomcat log file (catalina.2025-06-09.log).

Here are some steps you can try to resolve this issue:

  1. Make sure Tomcat is completely shut down before running the ANT script. If Tomcat is still running, it will keep the log files locked, preventing them from being deleted.

  2. Check if any other processes (like your IDE or other applications) might be accessing the log files. You may need to close these applications or restart your system.

  3. Verify that you have the necessary permissions to delete files in the Tomcat logs directory.

  4. If the issue persists, you could try modifying the execute.xml or tomcat.xml file to make the log file deletion optional rather than mandatory, allowing the build to continue even if it can't delete certain files.

  5. As a workaround, you could manually delete the log files before running the ANT script.

This is a common issue in the AWS Blu Age L3 Workshop automation step and is typically related to resource locking rather than a problem with your configuration.
Sources
AWS Blu Age L3 Workshop - Error on Automation - Execute | AWS re:Post
AWS Blu Age L3 workshop -Automation Build Failed | AWS re:Post
AWS Blu Age Level 3 Self-Paced Troubleshooting Workshop > Automation > Execute > Run execute.xml Ant script | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.