i have created a RunnableJar(Jar contain another third party jar like iText ,java class, etc etc ) and i have upload that RunnableJar.jar in oracle database using loadjava
in that jar i have main class GetOffer in that i have one method and the use of this method is to create multiple pdf according to user selection and concat them.
Now i have created Stored procedure
and i have called this stored procedure using following call statement
while Calling the procedure we are getting the below error.
SQL> VARIABLE myString VARCHAR2(20);
SQL> CALL getOffer("XYZ") INTO :myString
CALL getOffer("Any String") INTO :myString
ERROR at line 1:
ORA-06576: not a valid function or procedure name
I guess the problem might be caused by the nested jars. I suppose that the JVM in Oracle cannot find the libraries, which in turn causes errors while loading the GetOffer class, which is then reported as nonexistent.
My advice would be to try to load (using loadjava) all jars individually. Perhaps there are some logs in Oracle where the JVM messages could be found - to verify or disprove my supposition.
Joined: Dec 16, 2011
Yes you are right but i m running this program in eclipse and all this jar are reference libraries and this program work fine outside oracle.
But if we load all jar separately then i don't think it will work
Because if i write this GetOffer.java code in notepad and put all jar in same folder and run this using cmd then its give a lots of error.
So how to do that ...
As far as running the application from command line is concerned: putting all jars in a single directory is not enough, you need to add every single jar to the classpath. Then you can run it without bundling all jars together.
However, Oracle's JVM uses different rules to locate classes. I'm really no expert on this, but I believe it should be possible to get it right from the documentation.
Oracle wrote:All Java classes contain references to other classes. A conventional JVM searches for classes in the directories, ZIP files, and JAR files named in the CLASSPATH. In contrast, Oracle JVM searches schemas for class schema objects. Each class in the database has a resolver specification, which is Oracle Database counterpart to CLASSPATH. For example, the resolver specification of a class, alpha, lists the schemas to search for classes that alpha uses. Notice that resolver specifications are per-class, whereas in a classic JVM, CLASSPATH is global to all classes.