To add to this.
While creating a process instance, the browser displayed Error:transaction was marked as rollback only and has been rolled back. and somehow the process got created.
So I tried to complete the task it gave me a null pointer exception.
Resolved this by migrating the application to version 5.4.