我有一個簡單的java類來計算SHA1,我想從Oracle的PLSQL過程中使用它。 以下建議來自: SHA1, SHA256, SHA512 in Oracle for free without using DBMS_CRYPTO (我的簡單的情況下使用unly SHA1,不需要任何廣口瓶,並且由該進口java.security java.io和僅sha1.class的)如何在Solaris上的Oracle上安裝Java類
我編sha1.java有:
javac -target 1.2 -source 1.2 sha1.java
,並安裝在我的Windows測試環境這sha1.class:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
不幸的是我必須在Solaris上安裝它:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
我嘗試,但這些嘗試失敗:
c:\test>loadjava -thin -user ***** -resolve sha1.class
Error while creating class sha1
ORA-29545: badly formed class:: User has attempted to load a class (sha1) into a restricted package. Permission can be granted using dbms_java
.grant_permission(<user>, LoadClassInPackage...
The following operations failed
class sha1: creation
exiting : Failures occurred during processing
EDITED:
我.java源,而不是嘗試過的.class和我(從波蘭翻譯) ::
c:\mn>loadjava -thin -user ****** -resolve sha1.java
Error while creating sha1
ORA-06576: not a valid function or procedure name
Error while computing shortname of sha1
ORA-06550: line 1, column 13:
PLS-00201: must be declared 'DBMS_JAVA.SHORTNAME' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The following operations failed
source sha1: creation
exiting : Failures occurred during processing
我應該如何將此類或源加載到Solaris上的Oracle?
您是否嘗試以普通用戶或具有DBA特權的用戶身份加載它? – 2009-06-29 11:17:07