I had a really hard time finding the way to load the Oracle native libraries (Oracle runtime 10gR2 installation) on GlassFish (2.1.1) in linux (CentOS 5.4). Apparently GlassFish ignores the famous LD_LIBRARY_PATH variable for unknown reasons. I even tried setting it at the system wide profile. Nothing worked.
The java error was :
java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
I wrote a small java class that loaded the oci driver successfully. I was sure the parameters were correct. GlassFish still ignored them. I realised that GlassFish was the problem. I tried setting -Djava.library.path. It still didn't work.
To make a long story short the answer is to set it at the GlassFish Admin GUI :
Tab: Path Settings -->
Native Library Path Prefix : /path/to/oracle/client/installation/lib
I hope this will save you the time I spent searching fruitlessly the internet.
Do not forget to give the Oracle native libraries the rx permissions to the FlassFish Admin user!