Sunday, December 6, 2009

Invalid Java Object

We need to upload the JAVA CLASS again into database at that
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%';


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.
1) Go to $IAS_ORACLE_HOME and source the enviroment file.
2) Check for "loadjava" in environment.

$ which loadjava

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

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.
Note 206511.1 - How to Find a JAR File Which Contains a Particular JAVA CLASS Object?

No comments: