I am facing a problem and as far as I have searched, I have not found anything to solve it.
I have to define a setup process using only sql scripts (so command line tool will not be an option here).
A part of the setup is to load java classes in the database.
To do this, on a Windows environnent, I am using the plsql procedure as follows :
exec dbms_java.loadjava('-v ./class/ccj.jar');
considering that my class is located in C:\app\mytool\class\ and that I set the current directory to C:\app\mytool before running sqlplus, this will work (because sqlplus normally uses the current working directory).
But If I am using the same statement on Linux Redhat, considering that my jar file is located into the directory /tmp/app/mytool/class and setting the working directory to /tmp/app/mytool/ before running sqlplus, then I keep getting the error :
arguments: '-kprb' '-v' './class/ccp.jar' Error while opening file: ./class/ccp.jar Exception java.io.FileNotFoundException: No such file or directory creating : ./class/ccp.jar The following operations failed
+./class/ccp.jar: opening file+ exiting : Failures occurred during processing Exception in thread "Root Thread" oracle.aurora.server.tools.loadjava.ToolsError: Error during loadjava: Failures occurred during processing. Check trace file for details at oracle.aurora.server.tools.loadjava.LoadJavaMain.serverMain(LoadJavaMain.java:17
+8)+ at oracle.aurora.server.tools.loadjava.LoadJavaMain.serverMain(LoadJavaMain.java:11
+3)+ at oracle.aurora.server.tools.loadjava.LoadJavaMain.serverMain(LoadJavaMain.java:97
+)+ BEGIN dbms_java.loadjava('-v ./class/ccp.jar'); END;
*+ ERROR at line 1: ORA-29532: Java call terminated by uncaught Java exception: oracle.aurora.server.tools.loadjava.ToolsError: Error during loadjava: Failures occurred during processing. Check trace file for details ORA-06512: at "SYS.DBMS_JAVA", line 655 ORA-06512: at line 1
it seems that the working directory is just ignored on Linux because :
Hi Max: exec dbms_java.loadjava('-v ./class/ccj.jar'); is running in server side mode which means that paths like ./some_dir/ are relative to the ORACLE_HOME.
In your example ./class/ccj.jar is translated to $ORACLE_HOME/class/ccj.jar.
To use ./class/ccj.jar relative to the current directory try using loadjava tool, also you could integrate loadjava tool using Ant .
Best regards, Marcelo.
We have a java program that creates image containing text of different fonts & languages. We created a JAR and using loadjava have loaded this jar into the database(11g) and the image gets generated correctly.
When the same JAR is loaded into 10g database, though the image gets generated, all the text in it is displayed as boxes.
What could be the reason?
Why this difference between 10g & 11g??