Friday, September 27, 2013

Oracle 11g | Invalid Java Class Objects

Environment Details:
OS: Linux 5.8
Database Version: 11.2.0.3.0
Database User: Test

Issue: Java Class/Classes became INVALID after the upgrade of the database

Solution: First Compile and then resolve the Java Classes by using the below command.

ALTER JAVA SOURCE "OWNER"."OBJECT_NAME" COMPILE;

ALTER JAVA CLASS "OWNER"."OBJECT_NAME" RESOLVE;

Example:
SQL> select owner , object_name, object_type from dba_objects where status='INVALID';
OWNER       OBJECT_NAME             OBJECT_TYPE
----------- ----------------------- -----------
TEST        TestStringTokenizer     JAVA CLASS
TEST        TestStringTokenizer     JAVA SOURCE

SQL> ALTER JAVA SOURCE "TEST"."TestStringTokenizer" COMPILE;
Java altered.

SQL> ALTER JAVA CLASS "TEST"."TestStringTokenizer" RESOLVE;
Java altered.

SQL> select owner , object_name, object_type from dba_objects where status='INVALID';
no rows selected

Thursday, September 26, 2013

Oracle dbca | An unexpected error has been detected by HotSpot Virtual Machine


Environment Details:
OS: Linux 5.8
Database Version: 11.2.0.3.0
User: oracle
Issue: When the dbca is invoked for creating database, we get the below mentioned error and it is gets terminated.

54-oracle@linuxhost01=> dbca
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x0000003373279b60, pid=10441, tid=139987634067168
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_30-b03 mixed mode)
# Problematic frame:
# C  [libc.so.6+0x79b60]  strlen+0x10
#
# An error report file with more information is saved as hs_err_pid10441.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Abort

Solution: Set the LD_BIND_NOW parameter to 1 and then invoke dbca, it will work fine

55-oracle@linuxhost01=> export LD_BIND_NOW=1

56-oracle@linuxhost01=> dbca

Thursday, September 19, 2013

Oracle Error with Explain Plan | ORA-00904: "OTHER_TAG": invalid identifier

Environment Details:
OS: Linux 5.8
Database Version: 11.2.0.3.0
Issue: ERROR: an uncaught error in function display has happened; please contact Oracle support
Please provide also a DMP file of the used plan table PLAN_TABLE 
ORA-00904: "OTHER_TAG": invalid identifier

When we generate the explain plan and try to get the explain plan details from plan_table we get the above mentioned error.
The reason may be the plan table has been corrupted. We need to recreate the plan table using the script utlxplan.sql from $ORACLE_HOME/rdbms/admin and it will work fine.