Sunday, December 6, 2009

Invalid Java Object

We need to upload the JAVA CLASS again into database at that
Cause
After applying the patches , number of invalid increases.
All the new invalids are of type "JAVA CLASS".
We need to check as to which class the JAVA CLASS object belongs.

SQL> SELECT dbms_java.longname(object_name) from dba_objects where status ='INVALID' and object_Type like '%JAVA%';


DBMS_JAVA.LONGNAME(OBJECT_NAME)
--------------------------------------------------------------------------------
oracle/apps/per/util/gfmUpload
oracle/apps/pay/proc/extract/DocumentGenerator
oracle/apps/pay/proc/extract/DirectDepositConcurrentProgram

The result of this query shows that these java classes need to be uploaded to database.
Need to start loading with any of java class and continue the loading until no error comes.
Solution
1) Go to $IAS_ORACLE_HOME and source the enviroment file.
2) Check for "loadjava" in environment.

$ which loadjava
~/iAS/bin/loadjava

3) Go to $JAVA_TOP and run the following loadjava command for any invalid java class :-
SYNTAX:-
loadjava -force -verbose -resolve -user apps/@

Example:-
loadjava -force -resolve -user apps/***@connect_string oracle/apps/per/util/gfmUpload.class


4) On running load java, if error ORA-29521 comes like an example below:-
ORA-29521: referenced name oracle/ewt/util/WindowUtils could not be found

Run same loadjava command for that class type:-
loadjava -force -resolve -user apps/***@connect_string oracle/ewt/util/WindowUtils.class

Repeat the step 4, until load java completed successfully , without errors.
On successful completion, go to step 5.

5) Run adadmin , compile apps schema.

Above is the work around to fix increased number of JAVA CLASS type invalid objects after patching.
References
Note 206511.1 - How to Find a JAR File Which Contains a Particular JAVA CLASS Object?

No comments: