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

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

    903449
      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)
      http://www.oracle.com/technetwork/java/javase/downloads/index.html

      And then I downloaded SqlLoader zip File for 64 bit Windows from :
      Oracle SQL Developer for 64-bit Windows
      http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

      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|
          |Preferences|Database|Advanced
          • 2. Re: no ocijdbc11 in java.library.path (Win 7)
            903449
            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

              -Turloch
              SQLDeveloper Team
              • 4. Re: no ocijdbc11 in java.library.path (Win 7)
                903449
                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)
                  Veldhuis
                  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)
                    903449
                    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 ?

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

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

                      Regards,
                      Gary
                      SQL Developer Team
                      • 8. Re: no ocijdbc11 in java.library.path (Win 7)
                        903449
                        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 ?

                        Thanks,
                        Amitava
                        • 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 11.2.0.2 JDBC and has a mismatch with the OCI dll in 11.2.0.1, so you probably downloaded the 11.2.0.1 full client. Supposedly this issue does not occur with the 11.2.0.2.1 instant client.

                          -Gary
                          • 10. Re: no ocijdbc11 in java.library.path (Win 7)
                            903449
                            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 11.2.0.2. It is also not available in http://sac.us.oracle.com

                            Thanks,
                            Amitava
                            • 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 11.2.0.2.0

                              I know I mentioned 11.2.0.2.1 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,
                              Gary
                              • 12. Re: no ocijdbc11 in java.library.path (Win 7)
                                orafad
                                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:
                                http://www.oracle.com/technetwork/topics/winx64soft-089540.html

                                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.


                                Edit:

                                2)
                                Added some clarification about driver usage.


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

                                (http://docs.oracle.com/cd/E11882_01/java.112/e16548/instclnt.htm
                                http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci01int.htm#i423362)

                                >
                                •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
                                  3/
                                  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 11.2.0.2:
                                  try instant client downloads:
                                  http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
                                  Windows 11.2.0.2 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