我需要使用dbms_java.loadjava
远程系统在 Oracle 数据库中上传 jar 文件。
我努力了
call dbms_java.loadjava('–proxy -Dhttp.proxyHost=remote_system_ip -Dhttp.proxyPort=22 file:///home/abc.jar');
它返回Call completed.
但是,虽然使用 PLSLQ 的 jar 中的函数低于错误。
ORA-29540: class com/pkg_name/class_name does not exist
29540. 00000 - "class %s does not exist"
*Cause: Java method execution failed to find a class with the indicated name.
*Action: Correct the name or add the missing Java class.
但是,当将 jar 上传到 Oracle 数据库服务器并通过使用loadjava
命令执行相同操作时,它工作正常。
loadjava -user dbuser/dbpass path_to_jar/abc.jar
然后我可以从我的 PLSQL 代码中访问 jar 文件中的函数。
此外,我在运行它时注意到的另一件事,dbms_java.loadjava
即使abc1.jar
不是有效的文件名并且不存在,也可以成功完成以下命令。
call dbms_java.loadjava('–proxy -Dhttp.proxyHost=remote_system_ip -Dhttp.proxyPort=22 file:///home/abc1.jar');
请建议。