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…
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
OMFG! I’ve been trying to fix this error for hours! I can’t believe the solution was that simple. It feels like magic. Thanks!
Hi ,
I am getting the same error when I am trying to connect ot the database using OCI driver.. Could you please share the solution for this Issue?
Thanks in Advance
Venkat
Did you find the solution?
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
Pingback: the world's Scholar Social Network!
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.