Hi All,
I am using Oracle 11g and I have compile java classes in my db.
Recently I imported the db dump file to a new environment.
While compiling invalids I see a JAVA CLASS is in invalid status. But when I checked in old environment (where i take export) this java class is in VALID status.
I have used the below code
PROCEDURE export_source(name VARCHAR2, schema VARCHAR2, blob BLOB)
PROCEDURE export_class(name VARCHAR2, schema VARCHAR2, blob BLOB)
PROCEDURE export_resource(name VARCHAR2, schema VARCHAR2, blob BLOB)
create table scott.t (id number, b blob); declare b blob; begin dbms_lob.createTemporary(b, true, dbms_lob.CALL); dbms_java.export_class('sun/net/www/ParseUtil', user, b); dbms_output.put_line('length(b): '||length(b)); insert into "SCOTT"."T" values(1,b); end;
Source link - How to download a java class from database to file system
When I try to insert to a blob column and query the source, it gives me the following jumbled text

I tried utl_raw.cast_to_varchar2 but same result.
Is there any way to download the Java class source code and compile the invalid java class?
Thanks in advance.
Regards,
Soofi