2 Replies Latest reply: Apr 14, 2011 5:39 AM by rootsman RSS

    Java component - loading?

    rootsman
      Hi guys,

      I have problem with database 10g java component. In past i have done migration of database from one host to another. Version of database is 10.2.0.3 EE on Red Hat Enterprise 4 server. In that time i have on second server installed same version of Oracle software and then migrated database to its new host. After a while i receive a complain from developer that he is not capable to do debugging of one package, it throws him an Java exception error with code ORA-29532. I have investigate on metalink and found that it is probably lower version of Java compared with instance version.

      It looked something like this

      COMP_NAME STATUS VERSION
      Oracle Enterprise Manager VALID 10.2.0.3.0
      Spatial VALID 10.2.0.1.0
      Oracle interMedia VALID 10.2.0.1.0
      OLAP Catalog VALID 10.2.0.1.0
      Oracle XML Database VALID 10.2.0.1.0
      Oracle Text VALID 10.2.0.1.0
      Oracle Expression Filter VALID 10.2.0.1.0
      Oracle Rules Manager VALID 10.2.0.1.0
      Oracle Workspace Manager VALID 10.2.0.1.0
      Oracle Data Mining VALID 10.2.0.1.0
      Oracle Database Catalog Views VALID 10.2.0.3.0
      Oracle Database Packages and Types VALID 10.2.0.3.0
      JServer JAVA Virtual Machine VALID 10.2.0.1.0
      Oracle XDK VALID 10.2.0.1.0
      Oracle Database Java Packages VALID 10.2.0.1.0
      OLAP Analytic Workspace VALID 10.2.0.1.0
      Oracle OLAP API VALID 10.2.0.1.0

      I then looked a bit more and found that on location there is a script ORACLE_HOME/rdbms/admin/*catjava.sql* which could help me with my problem. I have runed that script and it didnt finished all steps corectly. Ive then executed catnojav.sql to remove Java component from database, and then i again execute catjava.sql and now i have problem.

      Now database Java component is in LOADING status when i check with select * from dba_registry

      How i can remove 10.2.0.1 Java version from my dataabse and installed desired one (10.2.0.3)?

      Thank you!
        • 1. Re: Java component - loading?
          rootsman
          And i forget to mention first time when i sxecute catjava.sql script i receive this in begining of output


          SQL> set echo on;
          SQL> @/db/oracle/10.201/rdbms/admin/catjava.sql
          SQL> Rem
          SQL> Rem $Header: catjava.sql 18-apr-2006.02:41:25 nireland Exp $
          SQL> Rem
          SQL> Rem catjava.sql
          SQL> Rem
          SQL> Rem Copyright (c) 2001, 2006, Oracle. All rights reserved.
          SQL> Rem
          SQL> Rem NAME
          SQL> Rem catjava.sql - CATalog scripts for JAVA
          SQL> Rem
          SQL> Rem DESCRIPTION
          SQL> Rem This script loads the java classes for RDBMS features; it
          SQL> Rem should be run after JAVA is loaded into the database. The
          SQL> Rem CATNOJAV.SQL script should be used to remove these java
          SQL> Rem classes prior to removing JAVA from the database.
          SQL> Rem
          SQL> Rem NOTES
          SQL> Rem Use SQL*Plus when connected AS SYSDBA
          SQL> Rem
          SQL> Rem MODIFIED (MM/DD/YY)
          SQL> Rem nireland     04/18/06 - Backport nireland_bug-4380942 from main
          SQL> Rem nireland     06/09/05 - Increase buffer size. #4380942
          SQL> Rem mkrishna     11/15/04 - add xquery jar by defaut
          SQL> Rem rburns     09/09/03 - cleanup
          SQL> Rem jwwarner     06/24/03 - add loading of catxdbj.sql here
          SQL> Rem rburns     04/26/03 - use serveroutput for diagnostics
          SQL> Rem rburns     06/13/02 - comments for catnojav.sql
          SQL> Rem rburns     04/05/02 - continue even if Jserver not valid
          SQL> Rem rburns     02/11/02 - add registry version
          SQL> Rem rburns     01/12/02 - Merged rburns_catjava
          SQL> Rem rburns     12/03/01 - Created
          SQL> Rem
          SQL>
          SQL> DOC
          DOC>##########################################################################
          DOC>##########################################################################
          DOC> If the following PL/SQL block fails, then JServer is not operational.
          DOC>##########################################################################
          DOC>##########################################################################
          DOC>#
          SQL>
          SQL> BEGIN
          *2      IF dbms_registry.is_valid('JAVAVM',dbms_registry.release_version) != 1 THEN*
          *3      RAISE_APPLICATION_ERROR(-20000,*
          *4           'JServer has not been correctly loaded into the database.');*
          *5      END IF;*
          *6 END;*
          *7 /*
          BEGIN
          ***
          ERROR at line 1:
          ORA-20000: JServer has not been correctly loaded into the database.

          ORA-06512: at line 3
          • 2. Re: Java component - loading?
            rootsman
            Just to make a little update, i have successed to reload java components by using metalink [ID 757771.1]

            sqlplus / as sysdba

            execute sys.dbms_registry.loaded('JAVAVM');
            execute sys.dbms_registry.loaded('CATJAVA');
            execute sys.dbms_registry.valid('JAVAVM');
            execute sys.dbms_registry.valid('CATJAVA');

            and now i have managed to upgrade java components on version 10.2.0.3 like i wish to do, but still developers cant debugg packages in database.

            Any help?