Oracle Error ORA-22951: NULL returned by ORDER method

Oracle Error Message

ORA-22951: NULL returned by ORDER method

Reason for the Error

ORDER method used to compare two object values returned NULL which is not allowed.

Solution

Redefine the ORDER method to not return a NULL.