After doing some research we found a solution from PDN which is as follows :
This error can occur for different reasons. In this particular case, the Oracle schema was replicated by importing an Oracle dump that was exported from a source schema that had a different name. As a result, the imported Pega out-of-the-box User Defined Functions (UDF) Java classes were still referring to the old schema name.
Follow the instructions below mentioned in PDN link below to resolve all of the invalid Java classes :