In reply to ankitjain:
Both copy() and clone() are already defined as part of the uvm_object class, and you don’t want to override them.
Instead, you want to implement do_copy() instead. The clone() and copy() functions will utilize your do_copy() method.
Refer to the Transaction Methods page for more information.