So it seems that if I do the following, it solves almost all my problems:
Edit the .profile file of Oracle users to install and export CLASSPATH, PATH, LD_LIBRARY_PATH, ORACLE_HOME, JAVA_HOME with the correct paths
SQLPlus as sys as sysdba
EXEC dbms_java.grant_permission( 'OER', 'SYS:java.util.PropertyPermission', 'java.class.path', 'write' );
OS Commandline as an oracle user:
loadjava –v –grant PUBLIC <jar> -user oer
SQLPlus as an OER user
DECLARE v_classpath VARCHAR2(4000); v_path VARCHAR2(4000); BEGIN v_classpath := DBMS_JAVA.set_property('java.class.path', '/opt/oracle/102/jdk/lib:/mnt/hgfs/vmshare/rex_lib/aler-axis- 1.2.1.jar:/mnt/hgfs/vmshare/rex_lib/aler-axis-jaxrpc-1.2.1.jar:/mnt/hgfs/vmshare/rex_lib/client.rex- 11.1.1.5.0.jar:/mnt/hgfs/vmshare/rex_lib/commons-httpclient-3.0rc2- flashline.jar:/mnt/hgfs/vmshare/rex_lib/log4j-1.2.8.jar'); v_path := DBMS_JAVA.set_property('java.path', '/opt/oracle/102/jdk/bin'); END; / alter java source "AssetExtractor" compile; show errors
The only incomprehensible problem is that for some reason it still cannot find / resolve some of the Oracle OER classes (which should all be in the client.rex * .jar file, I opened it and saw them there. Solve this part, then I will be glad.
source share