Oracle Solution for Error ora-29391

Solution for Oracle Error ORA-29391

ORA-29391: string and string must be mandatory to create a mandatory plan directive

What triggered the Error:

attempt was made to create a mandatory plan directive where either PLAN or GROUP_OR_SUBPLAN or both were not mandatory

What should we do to fix it:

create these objects as mandatory and then create the plan directive.