现象:
Alter java compile statement generates:
alter java source "Hello" compile;
ORA-00600: internal error code, arguments: [26599], [1], [180], [], [], [], [], [], [], [], [], []
The Call Stack Trace in the associated incident trace file is similar to:
joxrv21_lookup_name <- ioc_compiler_lookupname <- iocbf_compiler_lookup_name
<- ioc_do_callup_name <- joet_switched_env_callback <- ioct_compiler_lookup_name
<- jonhan_lookup_for_compiler <- jonhan8_lookup_for_compiler__cst__ <- jonhan8_lookup_for_compiler
Check for invalid Java object shows invalid JAVA CLASS and JAVA SOURCE:
SQL>select object_name, owner||' '||object_type||' '||to_char(created,'YYYY-MM-DD:HH24:MI:SS')||' '||timestamp||' '||to_char(last_ddl_time,'YYYY-MM-DD:HH24:MI:SS'), status
from dba_objects where object_name like '%Hello%' and status LIKE '%INVALID%';
Hello TC2 JAVA CLASS 2023-10-09:23:58:59 2023-10-09:23:58:59 2023-10-10:13:31:48 INVALID
Hello TC2 JAVA SOURCE 2023-10-09:23:58:59 2023-10-09:23:58:59 2023-10-10:13:31:48 INVALID
Datapump Import Option REMAP_SCHEMA=TC:TC2 is used where 'TC' is source schema and 'TC2' is target schema.
原因:
A similar incident investigated in 11.2.0.4 unpublished
Bug 18122798 : ORA-600 [26599] [1], [90] COMPILE JAVA CLASS
which is closed as not reproducible, Status 33 - Suspended. If other invalid classes are resolved first, ORA-600[26599] in 11.2 or loop in 12c do not occur.
Currently, internal team is reviewing ORA-00600: [26599], [1], [180] if it is due to a product defect.
处理方法:
As a possible workaround is to recreate Java source code on target database and compile it.
For example:
1. Get metadata for Java object using dbms_metadata.get_ddl:
SQL> set long 20000
SQL> select dbms_metadata.get_ddl('JAVA_SOURCE','Hello') from dual;
DBMS_METADATA.GET_DDL('JAVA_SOURCE','HELLO')
--------------------------------------------------------------------------------
CREATE JAVA SOURCE NAMED "TC2"."Hello" AS
public class Hello{ public static String world() { return "Hello world";
}}
2. Drop java source,
SQL> drop java source <Target Schema>."Hello";
SQL> drop java source TC2."Hello";
3. Create Java object when logged in as schema TC2:
SQL>CREATE JAVA SOURCE NAMED "Hello" AS
public class Hello{ public static String world() { return "Hello world";
}}
3. Compile Java object
SQL>alter java source "Hello" compile;
Java altered.
4. Check for invalid Java objects:
SQL> select object_name, owner||' '||object_type||' '||to_char(created,'YYYY-MM-DD:HH24:MI:SS')||' '||timestamp||' '||to_char(last_ddl_time,'YYYY-MM-DD:HH24:MI:SS'), status
from dba_objects where object_name like 'Hello';
Hello TC JAVA CLASS 2023-10-09:22:00:31 2023-10-09:22:00:31 2023-10-10:13:49:13 VALID
Hello TC JAVA SOURCE 2023-10-09:22:00:28 2023-10-09:22:00:28 2023-10-09:22:00:51 VALID
Hello TC2 JAVA SOURCE 2023-10-10:14:15:54 2023-10-10:14:15:54 2023-10-10:22:04:39 VALID
Hello TC2 JAVA CLASS 2023-10-10:14:15:54 2023-10-10:14:15:54 2023-10-10:22:04:39 VALID
|