Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am ready to upgrade the oracle 10g prod db to 11g, but we have 130 invalid objects in SYS (all are belong to JAVA CLASS object_type). And from the best practice of oracle upgrade from 10g to 11g, it said should not have any invalid objects in sys or system schema. But I already ran the utlrp.sql to recompile all invalid objects script multiple times, those invalid JAVA CLASS object_type objects are persistent in SYS user. And I tried to manually recompile each of those object as doing following,

alter java class "java class object name" compile; but got error: ORA-29521: referenced name balabala could not be found

You have any advice for either how to fix this error or can we go ahead to upgrade the db with those 130 invalid objects in the sys schema safely? Thanks!

share|improve this question
add comment

1 Answer 1

From this blog you can try this on development first...

SQL> spool resolve.sql;

SQL> select ‘alter java class “‘||object_name||’” resolve;’
2 from user_objects
3 where object_type like ‘%JAVA%’;

SQL> spool off;

SQL> @resolve

The clean sweep approach would be to remove and reinstall the java JVM

The Java VM is created and populated with system classes during CREATE OR REPLACE JAVA SYSTEM command. Run rmjvm.sql to remove the JVM first, then bounce the database then initjvm.sql

I repeat, these should be tried on your development stack first!

share|improve this answer
    
thx Kevin! But we don't have this issue in our dev or stage env, so not able to test there first... this issue is only existing on prod db though. And your post is definitely helping me to move on the right direction, will see what I can do. Thanks, Maggie –  magqq Sep 8 '11 at 3:22
    
resolve is not working. –  magqq Sep 16 '11 at 22:05
    
Then your next step is to remove and reinstall java. Or decide to do a fresh install of Oracle 11g and then do an import or data pump from the older version.I would add more but this expands the scope of the question beyond JAvA classes –  kevinsky Sep 16 '11 at 23:32
    
I ignored those invalid sys classes since oracle upgrade group told me, doing the upgrade may even fix those invalid java class objects. Which turned out somewhat true, 2 of those objects got fixed during the upgrade. –  magqq Dec 14 '11 at 22:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.