You may face below error while executing loadjava command:
ORA-06550: line 1, column 91: PLS-00201: identifier 'NameFromLastDDL' must be declared
SQL> select owner, object_name, object_type from all_objects where object_name like '%NameFromLastDDL%' ;and then install java on exist database by initjvm.sql script.
no rows selected
SQL> select comp_name, status from DBA_REGISTRY where upper(comp_name) like '%JAVA%' ;
no rows selected
http://download.oracle.com/docs/cd/B19306_01/install.102/e10319/java.htm#DFSIG276http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/scripts005.htm#sthref2935
run $ORACLE_HOME/javavm/install/initjvm.sql script.
SQL>@?/javavm/install/initjvm.sql
.
.
.
SQL> select owner, object_name, object_type from all_objects where object_name like '%NameFromLastDDL%' ;
OWNER OBJECT_NAME OBJECT_TYPE--------------- ------------------------------ -------------------SYS NameFromLastDDL FUNCTIONPUBLIC NameFromLastDDL SYNONYM
SQL> select comp_name, status from DBA_REGISTRY where upper(comp_name) like '%JAVA%' ;
COMP_NAME STATUS------------------------------------------------JServer JAVA Virtual Machine VALID
Reference: http://www.ora600.be/node/4628