Home » Developer & Programmer » JDeveloper, Java & XML » Application client as Java Stored Procedure
Application client as Java Stored Procedure [message #119298] Wed, 11 May 2005 12:09 Go to next message
proving_grounds
Messages: 3
Registered: May 2005
Location: Barcelona
Junior Member
Hello!

I've loaded an OC4J application client as Java Stored Procedures with loadjava, into an Oracle9i, and now it's available to PL/SQL procedures.

The problem appears when I invoke my Java code, with some JNDI stuff, from PL/SQL. It says cannot instantiate RMIInitialContextFactory (because it's not loaded into the database).

Can I avoid load all OC4J related jars in order to make my code work? Is there some compact version or I have to load oc4j.jar and listed jars on Manifest.mf? Is there some way to configure Oracle to see OC4J classpath externally (not loading jars)?

Thank you in advance,
Eva.
Re: Application client as Java Stored Procedure [message #130461 is a reply to message #119298] Sun, 31 July 2005 00:10 Go to previous messageGo to next message
kentvickery
Messages: 3
Registered: July 2005
Junior Member
Hi,

Did you ever find a solution to your problem. I am also having problems loading in a java class with LOADJAVA because is trying to use some external JAR packages. I don't want to have to load in all the JAR files into my database ...

Kent.
Re: Application client as Java Stored Procedure [message #130561 is a reply to message #130461] Mon, 01 August 2005 01:47 Go to previous message
proving_grounds
Messages: 3
Registered: May 2005
Location: Barcelona
Junior Member
I found a solution, but it was a little 'sui generis'.

The solution was to create a simple Java class with some methods that were the interface to call Java from PL/SQL and a method that called another class with a system call. This simple class didn't need any jar, so it was easy to load to Oracle.

The call to the external class was done with a system call 'java -classpath your_classpath foo.bar.Class'. foo.bar.Class was external to Oracle, but accesible to Oracle's user in the operative system. That class did the logic that needed all those jars configured in classpath. To return some result to the calling class it was done throw System.out, wich you can pick up with Process' method getInputStream().

I know it's not a general solution, perhaps not the most appropiate, but with my problem it worked ok.
Previous Topic: theuser.getSession(false) vs getSession(true)
Next Topic: Querying an Element Value from a Schema-based XMLType column
Goto Forum:
  


Current Time: Wed Apr 24 21:09:55 CDT 2024