My Oracle Support Banner

UnsatisfiedLinkError: /opt/oracle/database/11.2.0/client/lib/libocijdbc11.so is thrown when OCI JDBC driver is used with GlassFish 3.1.2 (Doc ID 1573858.1)

Last updated on JULY 31, 2018

Applies to:

Oracle GlassFish Server - Version 3.1.2 and later
Information in this document applies to any platform.

Symptoms

 When an application running on GlassFish 3.1.2 server configured to use OCI JDBC driver tries to connect to Oracle Database, the following errors are seen in server log and the application fails to connect to the Database:



Caused by: java.lang.UnsatisfiedLinkError: /opt/oracle/database/11.2.0/client/lib/libocijdbc11.so: libclntsh.so.11.1: cannot open shared object file:

 

Caused by: java.sql.SQLException: Internal Error: Fetch error message failed!
       at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:757)
       at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:414)
       at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
       at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)
       at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
       at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
       at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:207)
       at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:157)
       at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:115)

 

[#|2013-07-16T02:47:07.799+0000|SEVERE|oracle-glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=152;_ThreadName=p: thread-pool-1; w: 5;|java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: ORA-12154: TNS:could not resolve the connect identifier specified
       at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:120)
      

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.