問題一:
ERROR at line 1: ORA-29538: Java not installed
解決方法
1.檢查有沒有安裝JAVA元件
select * from v$option t where t.PARAMETER='Java';
如果傳回行說明已安裝,如果沒有傳回行,運作Oracle Universal Installer安裝JAVA元件
2.如果在第1步傳回行,則檢查oracle中有沒有dbms_java.
select distinct owner,name from dba_source where lower(NAME)='dbms_java';
如果沒有傳回行,執行第3步
3.在sqlplus下以sys登陸,執行$ORACLE_HOME/javavm/install/initjvm.sql
SQL>@?/javavm/install/initjvm.sql;
問題二:
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.security.AccessControlException: the Permission (java.io.FilePermission
/home/accmgrctl/src/server read) has not been granted to SQLVIEW. The PL/SQL to
grant this is dbms_java.grant_permission( 'SQLVIEW',
'SYS:java.io.FilePermission', '/home/accmgrctl/src/server', 'read' )
ORA-06512: at "SQLVIEW.PKG_FILE_API", line 1
解決方法:
這是由于oracle使用者沒有通路那個目錄的權限,把源代碼入在oracle有權限通路的目錄下
或者用以下語句授權
EXEC Dbms_Java.Grant_Permission('oracle_username','java.io.FilePermission', '*','read ');
問題三:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00552: internal XAD package failed to load
ORA-06512: at "SYS.ORACLE_LOADER", line 19
這是110202 上的又一新BUG(外部表的讀取)
Need to replace the language specific (non-english) kup<lang>.msb file
with the english version.
1. cd $ORACLE_HOME/rdbms/mesg
2. Replace <lang> with your installed languages file.
mv KUP<lang>.msb to KUP<lang>.msb.BAK
3. Copy <us> version over current <lang> copy of kup msb file.
cp kupus.msb to KUP<lang>.msb
4. re-run the select against the external table
我實際的操作過程,就是:
該目錄:$ORACLE_HOME/rdbms/mesg 下有兩個檔案:
kupzhs.msb 和 kupus.msb, 其預設使用了kupzhs.msb
此時,我把kupzhs.msb 重新命名為 kupzhs.msb.bak
之後在測試, OK: