java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path

So I’m trying to configure a servlet running on Tomcat to connect to IBM’s DB2 Content Management system (via II4C). I can get it to run under WebSphere using Rational Application Developer but seeing as I want to buy a MacBook Pro for my development, I figure I need to start using a more vanilla toolset. Martin Fowler‘s Ravine post served as part of the inspiration. I actually believe it’s a good idea to build J2EE apps using a variety of tools…proves the openstandardiness of my work. The fact that I’m calling a client app from a server (II4C is a windows installed app) disproves that a little but whatever…the next stage will be abstracting that beastie behind some enterprise service layer and that’s that

The error comes from the driver’s need for the presence of ocijdbc9 in the container’s library path.  Yeah, I know the use of Oracle’s thin driver eliminates the need to this coupling but in this case, I’m working with someone else’s project…they’re using this driver.

So add <<oraclehomedirectory>>/bin to the container’s Libary path and you’re back in the game…

About these ads

7 thoughts on “java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path

  1. java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
    java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    java.lang.Runtime.loadLibrary0(Runtime.java:822)
    java.lang.System.loadLibrary(System.java:992)
    oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
    oracle.jdbc.driver.OracleConnection.(OracleConnection.java:346)
    oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    java.sql.DriverManager.getConnection(DriverManager.java:525)
    java.sql.DriverManager.getConnection(DriverManager.java:171)
    ImageUpload.processRequest(ImageUpload.java:86)
    ImageUpload.doGet(ImageUpload.java:156)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

    i am using oracle 10g client in my machine

  2. Hi,

    I also get this kind of error while testing the oracle connection. Error message is: “no ocijdbc11 in java.library.path” I am using SQL Developer Version 1.5.0.53. But I don’t know what is “container’s Libary path” and how to add <>/bin to it. Please help.

    Thanks,
    Shikha

  3. Pingback: the world's Scholar Social Network!

  4. Its such as you learn my thoughts! You seem to understand so much approximately this,
    like you wrote the book in it or something.
    I believe that you just could do with a few percent to pressure the message home a little
    bit, however instead of that, this is great blog. A fantastic read.
    I will certainly be back.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s