Oracle ORA-29538: Java not installed
扩容库是用脚本手工建库的,在跑一研发提供的存储过程时,抛出如下的错误:ORA-29538: Java not installed下面记录一下整个过程:
扩容库是用脚本手工建库的,,在跑一研发提供的存储过程时,抛出如下的错误:
ORA-29538: Java not installed
下面记录一下整个过程:
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
于是要安装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
附加:
重新安装JVM在oracle11gr1
(1)关闭数据库,然后运行如下的脚本先删除现有的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
说明:这一步可能会引发一些bug,请慎用!
(2)安装JVM的脚本:
-- 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)检查JVM及一些安装包的状态
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
/
推荐阅读
-
Ubuntu 12.10下安装 Oracle Java分享教程
-
java当中JDBC当中请给出一个Oracle DataSource and SingleTon例子
-
oracle数据库查询没问题,正常显示两个汉字;但是java后台Hibernate查询的时候只显示第一个汉字怎么解决?
-
Java oracle数据库填数据时报错ora-12505问题解决办法
-
mybatis oracle proc 数据库测试没问题,java调用就异常 ORA-00900: 无效 SQL 语句
-
eclipse怎么实现java连oracle数据库?
-
oracle如何使用java source调用外部程序
-
java当中请给出一个oracle的helloworld例子
-
java ssm框架实现分页功能的示例代码(oracle)
-
java数据库JDBC连接Oracle数据库