1

I need to upload a jar file in the Oracle database using dbms_java.loadjava from a remote system.

I have tried call dbms_java.loadjava('–proxy -Dhttp.proxyHost=remote_system_ip -Dhttp.proxyPort=22 file:///home/abc.jar');

Its returning Call completed. However, while functions in the jar using PLSLQ getting below error.

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.

However, when uploading jar to the Oracle Database server and do the same through using loadjava command its working fine.

loadjava -user dbuser/dbpass path_to_jar/abc.jar

Then I am able to access the functions in the jar file from my PLSQL code.

Also, one more thing I noted when running dbms_java.loadjava it's getting completed successfully for below command even when abc1.jar is not a valid file name and doesn't exist.

call dbms_java.loadjava('–proxy -Dhttp.proxyHost=remote_system_ip -Dhttp.proxyPort=22 file:///home/abc1.jar');

Please suggest.

Tajinder
  • 2,248
  • 4
  • 33
  • 54

1 Answers1

0

As far as I know you can only upload from the database server.

The reason why dbms_java.loadjava completes even though the file does not exist: ask Oracle.

But you can always verify using the Oracle dictionary e.g. USER_OBJECTS.