Above error happens, when an entity has a transient property. Removal of the transient property eliminates the error and the entity gets deployed.