13 Replies Latest reply: Dec 8, 2011 6:56 AM by Turloch O'Tierney-Oracle RSS

    no ocijdbc11 in java.library.path (Win 7)

      Need your help. I got a Windows 7 laptop this week at work and it is giving me the below error when I try to connect using connect string. It works fine with dedicated host name (connection type Basic). If I use connection type as TNS and provide a connect string and test the connection, I get no ocijdbc11 in java.library.path

      I downloaded and installed JDK from :
      Java SE 6 Update 29 (For Windows 64 bit)

      And then I downloaded SqlLoader zip File for 64 bit Windows from :
      Oracle SQL Developer for 64-bit Windows

      When I unzip SQL Developer and run the exe file. First time SQL Developer asked me java path and I gave C:\Program Files\Java\jdk1.6.0_29\bin\java.exe

      Please let me know if I missed something.
        • 1. Re: no ocijdbc11 in java.library.path (Win 7)
          Jim Smith
          Do you have an Oracle client installation? To use the OCI driver, you need an oracle client installation with the OCI libraries. For SQL Developer 3 it needs to be an 11g client.

          Alternatively, you can disable the use of the OCI driver by unticking "Use OCI/Thick driver" in Tools|
          • 2. Re: no ocijdbc11 in java.library.path (Win 7)
            I do not have Oracle 11g client installed in my laptop (this is Oracle Product development IT base image). My other colleagues do not have client installed and they did not face this issue. Also "Use OCI/Thick driver" option (default) is not checked and I did not change the setting.

            Please confirm if I want to use Connection Type "TNS" and use connect identifier to provide TNS details of a RAC DB (which is a central ST database to run Fusion Environment), I HAVE TO install a Oracle 11g Client ?

            Thanks much.
            • 3. Re: no ocijdbc11 in java.library.path (Win 7)
              Turloch O'Tierney-Oracle
              Hi user700344,

              Connection Type TNS:

              Network Alias - no additional software needed - just tnsnames.ora
              Connection Identified - needs 'OCI' i.e. Oracle Client

              SQLDeveloper Team
              • 4. Re: no ocijdbc11 in java.library.path (Win 7)
                Thanks could you please point me a oracle.com link to download this client that I need for Windows 7 (64 bit) ?
                • 5. Re: no ocijdbc11 in java.library.path (Win 7)
                  Or, like Jim Smith already mentioned, you don't need the OCI driver if "Use OCI/Thick driver" is unticked in Tools|Preferences|Database|Advanced.
                  Instead of the OCI driver you need the JDBC (thin) driver for basic and TNS (network alias) database connections.
                  • 6. Re: no ocijdbc11 in java.library.path (Win 7)
                    As I mentioned before, I need to use Oracle RAC DB (with multiple hosts) and I need to use connect identifier (under connection type TNS), could you please provide me a link in oracle.com that I need to download and install to get requisite OCI jars ?

                    • 7. Re: no ocijdbc11 in java.library.path (Win 7)
                      Gary Graham-Oracle

                      It sounds like you need to look for an Oracle or client download in the Software Archive at https://sac.us.oracle.com

                      SQL Developer Team
                      • 8. Re: no ocijdbc11 in java.library.path (Win 7)
                        Thanks Gary. I installed 11g Client and now when I test Oracle SQL Developer connection, I get the following error now --

                        "Failure - Test failed: oracle.jdbc.driver.T2CConnection.getlibraryVersionNumber()I"

                        Any clue ?

                        • 9. Re: no ocijdbc11 in java.library.path (Win 7)
                          Gary Graham-Oracle
                          Hi Amitava,

                          Perhaps I should have researched this more before pointing you to a full client install without specifying the exact version. Sorry!

                          Turns out your latest issue is covered here:
                          3.0 final+EA4: Doesn't work with 11.1 OCI/Thick driver

                          It notes (in referenced bug number) SQL Developer 3.x comes with JDBC and has a mismatch with the OCI dll in, so you probably downloaded the full client. Supposedly this issue does not occur with the instant client.

                          • 10. Re: no ocijdbc11 in java.library.path (Win 7)
                            What are my options now?

                            From http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html I did not see any 11g Client install download available for It is also not available in http://sac.us.oracle.com

                            • 11. Re: no ocijdbc11 in java.library.path (Win 7)
                              Gary Graham-Oracle
                              You are probably correct regarding SAC, but please see this specific post from the forum thread I referenced above:
                              Re: 30EA4: Doesn't work with OCI/Thick driver

                              Look at the last component included within ODAC112021Xcopy_32bit.zip: Oracle Instant Client

                              I know I mentioned in my other post, but I took that from the bug text -- that's what QA used to verify the solution, but I'm not sure if that refers to the Oracle Instant Client version or the ODAC version. I would think you need to de-install the full client before installing the instant client.

                              Best Wishes,
                              • 12. Re: no ocijdbc11 in java.library.path (Win 7)
                                ODAC package may be a bit much, if you just need Client libs for SQL Developer.

                                Since it seems you are using 64-bit sqldev / jvm, Instant Client for 64-bit may be found via:

                                Instant Client package - Basic Lite alone should be enough. From instantclient_11_2 in the archive, just drop the files ocijdbc11.dll, oci.dll and oraociicus11.dll in sqldeveloper folder (same dir as the .exe).

                                If you have Oracle Home's (64-bit in this case) installed on the machine, you may need to find a way to stop Sql Developer from searching Home registry entries and thus avoid picking up Net config files (tnsnames.ora, sqlnet.ora) from such places.

                                Though, when testing, for TNS connection type with Network alias drop down it did not matter setting PATH, TNS_ADMIN or planting a oracle.key file (then bouncing sqldev), either way it found a Home and searched it for Net config files. I'm not sure why. A simple workaround however, is to use Connect Identifer field instead with easy connect syntax (no tnsnames.ora necessary).

                                Note, for Connection type TNS / network alias, the error may appear if 'use OCH/Thick driver' is ticked in preferences. Otherwise the included thin client will be used, hence no need for OCI/Instant Client.

                                Hope this helps.


                                Added some clarification about driver usage.

                                I wanted to add, related to testing the setup, that docs states about JDBC OCI Instant Client:


                                •Only one set of Oracle libraries should be specified in the library path environment variable. That is, if you have multiple directories containing Instant Client libraries, then only one such directory should be specified in the library path environment variable.

                                •If you have an Oracle home on your computer, then you should not have the ORACLE_HOME/lib and Instant Client directories in the library path environment variable simultaneously, regardless of the order in which they appear in the variable. That is, only one of ORACLE_HOME/lib directory (for non-Instant Client operation) or Instant Client directory (for Instant Client operation) should be specified in the library path environment variable.

                                However, I'm not sure how to achieve such setup properly in the context of SQL Developer on Windows. For example, Sqldeveloper seem to regardless of system env settings, look for ORACLE_HOME via Registry node/tree. But my test was by no means exhaustive.

                                Edited by: orafad on Dec 7, 2011 12:39 PM

                                Edited by: orafad on Dec 7, 2011 11:03 PM

                                Edited by: orafad on Dec 8, 2011 1:32 AM
                                • 13. Re: no ocijdbc11 in java.library.path (Win 7)
                                  Turloch O'Tierney-Oracle
                                  Hi All,

                                  Amitava has got away with using thin:

                                  Try pure java thin:
                                  1/create tnsnames.ora file
                                  2/Set tnsnames directory
                                  tools->Preferences->Database->advanced->Tnsnames Directory
                                  tools->Preferences->Database->advanced->use oci/thick driver unchecked
                                  4/ new connection connection type TNS -> Network Alias (pick from list)
                                  5/try connection
                                  If that works - fine no additional software required.

                                  Thick (OCI) has a few more features and is slightly more stable, requires additional software
                                  instant client (or Oracle client or Oracle server) version
                                  try instant client downloads:
                                  Windows instant client from:
                                  32bit: http://www.oracle.com/technetwork/topics/winsoft-085727.html
                                  64bit: http://www.oracle.com/technetwork/topics/winx64soft-089540.html

                                  From Memory:
                                  unzip Set PATH and ORACLE_HOME [you can just set them in the session for initial test] (LD_LIBRARY_PATH needs to be set for linux)

                                  Note there is a preference:
                                  - Tools preferences -> database -> advanced -> use oci/thick driver

                                  Thick is required for
                                  new connection connection type TNS -> Connection Identifier.

                                  -Turloch O'Tierney
                                  SQLDeveloper Team

                                  Edited by: Turloch O'Tierney on Dec 8, 2011 4:55 AM