ORA-29540: class does not exist

Hello,

I’m trying to install UDFs using generateudf.sh file. The build is succesfull but when I validate using below command, I found zero results.

select dbms_java.longname(Object_Name), status from dba_objects where owner= ‘RULES’ and object_type like ‘JAVA%’;

and when I try to run the UDF pr_read-from_stream query ,below error exits.

ORA-29540: class com/pega/pegarules/data/udf/directstreamreader/DirectStreamReader does not exist.

Can someone help with step by step procedure to install UDFs.

@SivaK17078241

To manually install UDFs for Pega 718 on DB2 and Oracle, follow these steps:

  1. Run this query: SELECT dbms_java.longname(object_name) FROM all_objects WHERE status!=‘VALID’ AND object_type LIKE ‘JAVA%’; Check if the class ‘com/pega/pegarules/data/udf/directstreamreader/DirectStreamReader’ is listed here or not.
  2. Check if the below functions exist or not: pegarules/data/udf/directstreamreader/CachedDirectStream and com/pega/pegarules/data/udf/directstreamreader/BasicEnvironmentAdapter.
  3. If the Java classes are installed and they are in an invalid state, Oracle validates them the first time you use them. You can use the UDFs for the first time to see if Oracle automatically validates them.
  4. If the query fails with an ORA-29541 error, you need to force Oracle to revalidate UDFs. To do this, run the following command for each Java class that is in an invalid state: ALTER JAVA CLASS "com/pega/pegarules/data/internal/clipboard/directstream/ByteArrayUtil" RESOLVER ((vXYRULES)( public)) RESOLVE;
  5. If the query results are successful, but the Java classes still show as invalid, you need to force Oracle to revalidate UDFs.

Please note that it’s not advised to use UDFs in a production environment.

:warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

Pega 718 UDF Installation Manual

Troubleshooting user-defined functions

ORA-29540: class com/pega/pegarules/data/udf/directstreamreader/DirectStreamReader does not exist

Invalid java class object

UDF issue after DB cloning