Thanks for the helpful advice. Definitely useful for future reference.
Had done some googling on my problem (Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction) and found it's caused by database transaction deadlock.
The actual cause is due to some prior operation involving running an external command which was unsuccessful. The failure of running the external command caused the database transaction deadlock hence causing the problem.
Good troubleshooting exercise hahaWill be doing something to mitigate this.
Thanks for your help :)
For best results, use the Firefox browser..