Oracle ORA-29538: Java not installed

Source: Internet
Author: User

A script is used to manually create a database for expansion. when running the stored procedure provided by R & D, the following error is thrown:
ORA-29538: Java not installed

The entire process is recorded below:
SQL> select * from v $ version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0-64bit Production
PL/SQL Release 11.1.0.7.0-Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0-Production
NLSRTL Version 11.1.0.7.0-Production

SQL> select * from v $ option t where t. PARAMETER = 'java ';

PARAMETER VALUE
--------------------------------------------------------------------------------------------------------------------------------
Java TRUE

SQL> select distinct owner, name from dba_source where lower (NAME) = 'dbms _ Java ';

OWNER NAME
------------------------------------------------------------
SYS DBMS_JAVA

SQL> select owner, status, count (*) from all_objects where object_type like '% JAVA %' group by owner, status;

No rows selected

Therefore, you need to install JVM:
@? /Javavm/install/initjvm. SQL

SQL> select owner, status, count (*) from all_objects where object_type like '% JAVA %' group by owner, status;

Owner status count (*)
-------------------------------------------------------
Sys valid 19662

SQL> select comp_name, version, status from dba_registry;

COMP_NAME VERSION STATUS
-------------------------------------------------------------------------------------
Oracle Workspace Manager 11.1.0.7.0 VALID
Oracle Database Catalog Views 11.1.0.7.0 VALID
Oracle Database Packages and Types 11.1.0.7.0 VALID
JServer JAVA Virtual Machine 11.1.0.7.0 VALID


@? /Xdk/admin/initxml. SQL

SQL> select owner, count (*) from all_objects where object_type like '% JAVA %' group by owner;

Owner count (*)
----------------------------------------
SYS 20738


@? /Rdbms/admin/catjava. SQL

SQL> select owner, count (*) from all_objects where object_type like '% JAVA %' group by owner;

Owner count (*)
----------------------------------------
SYS 21097

@? /Rdbms/admin/catexf. SQL
@? /Xdk/admin/xmlja. SQL
SQL> select owner, count (*) from all_objects where object_type like '% JAVA %' group by owner;

Owner count (*)
----------------------------------------
EXFSYS 44
SYS 21097

 

Additional:
Reinstall JVM on oracle11gr1
(1) shut down the database and run the following script to delete the existing JVM:
-- Start of File full_rmjvm. SQL
Spool full_rmjvm.log
Set echo on
Connect/as sysdba
Startup mount
Alter system set "_ system_trig_enabled" = false scope = memory;
Alter system enable restricted session;
Alter database open;
@? /Rdbms/admin/catnoexf. SQL
@? /Rdbms/admin/catnojav. SQL
@? /Xdk/admin/rmxml. SQL
@? /Javavm/install/rmjvm. SQL
Truncate table java $ jvm $ status;
Select * from obj $ where obj # = 0 and type # = 0;
Delete from obj $ where obj # = 0 and type # = 0;
Commit;
Select owner, count (*) from all_objects
Where object_type like '% JAVA %' group by owner;
Select obj #, name from obj $
Where type # = 28 or type # = 29 or type # = 30 or namespace = 32;
Select o1.name from obj $ o1, obj $ o2
Where o1.type # = 5 and o1.owner # = 1 and o1.name = o2.name and o2.type # = 29;
Shutdown immediate
Set echo off
Spool off
Exit
-- End of File full_rmjvm. SQL
Note: This step may cause some bugs. Please use it with caution!

(2) JVM installation script:
-- Start of File full_jvminst. SQL
Spool full_jvminst.log;
Set echo on
Connect/as sysdba
Startup mount
Alter system set "_ system_trig_enabled" = false scope = memory;
Alter database open;
Select obj #, name from obj $
Where type # = 28 or type # = 29 or type # = 30 or namespace = 32;
@? /Javavm/install/initjvm. SQL
Select count (*), object_type from all_objects
Where object_type like '% JAVA %' group by object_type;
@? /Xdk/admin/initxml. SQL
Select count (*), object_type from all_objects
Where object_type like '% JAVA %' group by object_type;
@? /Xdk/admin/xmlja. SQL
Select count (*), object_type from all_objects
Where object_type like '% JAVA %' group by object_type;
@? /Rdbms/admin/catjava. SQL
Select count (*), object_type from all_objects
Where object_type like '% JAVA %' group by object_type;
@? /Rdbms/admin/catexf. SQL
Select count (*), object_type from all_objects
Where object_type like '% JAVA %' group by object_type;
Shutdown immediate
Set echo off
Spool off


(3) Check the status of JVM and some installation packages.
Connect/as sysdba
Spool jvm_stats.log
Set serveroutput on
Set echo on
Set pagesize500
Set linesize 100
Column comp_name format a40
Select comp_name, version, status from dba_registry;
Select owner, status, count (*) from all_objects
Where object_type like '% JAVA %' group by owner, status;
Select owner, object_type, count (*) from all_objects
Where object_type like '% JAVA %' and status <> 'valid' group by owner, object_type;
Select owner, status, object_type, object_name from all_objects
Where object_name like '% DBMS_JAVA % ';
Select owner, status, object_type, object_name from all_objects
Where object_name like '% INITJVMAUX % ';

Select role from dba_roles where role like '% JAVA % ';
Select * from v $ sgastat where POOL = 'java pool 'or NAME = 'free memory ';
Show parameter pool_size
Show parameter target

Show parameter sga

Select owner, object_type, status, dbms_java.longname (object_name) from all_objects
Where object_type like '% JAVA %' and status <> 'valid ';
Spool off
/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.