Friday, October 17, 2008

WebSphere and Oracle 10g Data Source

Problem:
WebSphere 6.1 - Solaris 9 - java.sql.SQLException: java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path

Solution:
It appears that there might be ojdbc jars from Oracle 9i reference somewhere inside the WebSphere classloader path. Update the jar references to Oracle 10g jdbc lib JARs.

Problem:
WebSphere 6.1 - Solaris 9 - java.sql.SQLException: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path

Solution:
Update .profile for the account that runs WebSphere with the following.
LD_LIBRARY_PATH=$ORACLE_HOME/lib32
export $LD_LIBRARY_PATH
Exit the SSH session, relogin to Unix system and restart the WebSphere process

For 64 bit systems, LD_LIBRARY_PATH=$ORACLE_HOME/lib instead of lib32.