This discussion is archived
3 Replies Latest reply: Jul 30, 2013 9:50 AM by Joe Weinstein RSS

Weblogic ojdbc jar not compatible for Oracle OCI driver

Jayakumar Jayaraman Newbie
Currently Being Moderated

I am able to run a standalone java code to connect to Oracle database using OCI driver.

It works only on ojdbc6.jar from my local oracle client in below location C:\app\client\jjayarman\product\12.1.0\client_1\jdbc\lib\ojdbc6.jar

The same code fails with below error when it runs in a web app deployed on Weblogic 12c on my locahost because of its existing ojdbc jar.

Error: "javax.faces.el.EvaluationException: java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path"

Should I replace all the ojdbc jars in the weblogic with the working ojdbc6.jar.

Is there any clean solution available ?

I am using Weblogic 12c, Oracle Database 12c, Windows 7 64Bit, Java 1.7

Many Thanks Jay

  • 1. Re: Weblogic ojdbc jar not compatible for Oracle OCI driver
    Joe Weinstein Expert
    Currently Being Moderated

    The clean solution is to stick with connecting in the 'thin' mode. OCI is native code. There is a brittle relationship between the java portion of the driver and the OCI part, if/when used. Only one specific version of the java jar will work with any given version of OCI. I believe the driver guys have implemented everything in the thin mode that you can do with OCI, including referencing the tnsnames.ora file etc, so there may be no functional or performance reason to stay with OCI. However, if it's easier for you, yes, once you have a version of OCI and a driver jar that work together, as long as you get that driver to the fore in the WLS classpath, and the OCI libs in the load path, WebLogic will be able to use the driver.

  • 2. Re: Weblogic ojdbc jar not compatible for Oracle OCI driver
    Jayakumar Jayaraman Newbie
    Currently Being Moderated

    Hi Joe,

     

    Thanks for the reply.

    I agree I have used only thin driver on all previous projects.

    But in current project, the user authentication model is quite different and uses oracle authentication.

    We are trying to use OCI only because of certain fine grained exceptions which are thrown by OCI but not on thin driver.

    I would try to figure out the right drivers and version. Seems to be a time consuming task.

     

    When I use OCI driver, and if a connection has a SqlWarning 'ORA-28002: the password will expire within 10 day'....

    And when I call ............  connection.prepareCall(function); I get the java.lang.ArithmeticException: / by zero

    Any solution ?

     

    Thanks

    Jay

  • 3. Re: Weblogic ojdbc jar not compatible for Oracle OCI driver
    Joe Weinstein Expert
    Currently Being Moderated

    Download and test the latest Oracle client (which includes a compatible

    OCI and driver), and if this still happens, open an official SR with Oracle.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points