Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Setting java.library.path in OC4J on Oracle 10g release 3

Re: Setting java.library.path in OC4J on Oracle 10g release 3

From: Ganesh Iyer <ganeshjiyer_at_gmail.com>
Date: 18 May 2006 10:00:01 -0700
Message-ID: <1147971601.828634.312710@i40g2000cwc.googlegroups.com>


Did you check out the OTN forums?

I found this information in OTN...

<<<<<<<<<
There's two aspects which need to be considered:

  1. the Java wrapper classes you have which call out to the native libary.
  2. the native libs themselves (which I'll call a .dll from hereon in for simplicity).

What you would need to do is make sure the Java wrapper classes are all available to the web application. This can be done by either packaging them in a jar file and putting it into the web-inf/lib directory of your web application, or leaving them in an unpackaged form and putting it into the web-inf/classes directory.

I do vaguely remember helping someone debug a JSP tag lib issue once before which used native code and we ran into some problems with concurrent use of the same DLL (a Java restriction) because a DLL can only be registered once per JVM instance and the threading model meant it was being loaded more than once -- but it may have also had something to do with the JSP taglib cache.

If you do get some form of Java runtime exception showing concurrent access error for the native lib, what you can do is move the lib with the Java wrapper classes into the global classpath (j2ee/home/applib) meaning it's only ever loaded once..

Then what you need to do is make sure the DLL itself is accessible to the Java process -- on Windows this is done by making sure directory holding the DDL is set in the PATH environment variable before -- before starting OC4J. On other platforms, it can be done using the LD_LIBRARY_PATH environment variable.

That should be all you need to do to make it work.

>>>>>>>>>>

Hope this helps,
Thanks and regards,
Ganesh Iyer Received on Thu May 18 2006 - 12:00:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US