Java OCI Connection Oracle throw JAVA.LANG.UNSATISFIEDLINKERROR:OCIJDBC11 ...

Source: Internet
Author: User

To successfully install the Oracle client first, use the Sqlplus tool to connect the local service name of the Tnsnames.ora configuration such as:

Conn user/[email protected]

If the connection is successful, the client installation is successful.

Java programs to use the OCI to connect to local services, you need to configure the corresponding configuration of the specific visible oracle_home/jdbc/readme.txt file, where

Some excerpts are as follows:

Setting Up Your Environment

---------------------------

On Windows platforms:

-Add [Oracle_home]\jdbc\lib\ojdbc5.jar to

Your CLASSPATH If you use JDK 1.5 or

[Oracle_home]\jdbc\lib\ojdbc6.jar If you use JDK 1.6.

-Add [Oracle_home]\jlib\orai18n.jar to your CLASSPATH if needed.

-Add [Oracle_home]\bin to your PATH if is using the the JDBC OCI

Driver.

On Solaris/digital Unix:

-Add [Oracle_home]/jdbc/lib/ojdbc5.jar to your CLASSPATH if you

Use JDK 1.5 or [Oracle_home]/jdbc/lib/ojdbc6.jar if your use JDK 1.6

-Add [Oracle_home]/jlib/orai18n.jar to your CLASSPATH if needed.

-Add [Oracle_home]/jdbc/lib to your ld_library_path if your use

The JDBC OCI driver.

On Hp/ux:

-Add [Oracle_home]/jdbc/lib/ojdbc5.jar to your CLASSPATH if you

Use JDK 1.5 or [Oracle_home]/jdbc/lib/ojdbc6.jar if your use JDK 1.6

-Add [Oracle_home]/jlib/orai18n.jar to your CLASSPATH if needed.

-Add [Oracle_home]/jdbc/lib to your Shlib_path and Ld_library_path

If you use the JDBC OCI driver.

On AIX:

-Add [Oracle_home]/jdbc/lib/ojdbc5.jar to your CLASSPATH if you

Use JDK 1.5 or [Oracle_home]/jdbc/lib/ojdbc6.jar if your use JDK 1.6

-Add [Oracle_home]/jlib/orai18n.jar to your CLASSPATH if needed.

-Add [Oracle_home]/jdbc/lib to your LIBPATH and Ld_library_path

If you use the JDBC OCI driver.

Ensure that the JDBC OCI driver used by the program is consistent with the Oracle client, and that the Nls_lang is consistent with the database and client character set configurations.

After the above configuration, if the program still appears java.lang.UnsatisfiedLinkError:ocijdbc11 ... Case

Check to see if the program uses the JDK version number (32-bit or 63-bit) to match the Oracle client version.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.