ORA-12154 When Connecting with JDBC/OCI Driver (Doc ID 387561.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version 10.2.0.1 to 10.2.0.3 [Release 10.2]
Oracle Solaris on x86-64 (64-bit)

Symptoms

JDBC/OCI connection fails with ORA-12154 on SOLARIS 10 X86-64

java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified
  at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:672)
  at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:346)
  at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
  at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:132)
  at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:78)
  at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
  at java.sql.DriverManager.getConnection(DriverManager.java:525)
  at java.sql.DriverManager.getConnection(DriverManager.java:171)
  at TestJDBCVersion.version(TestJDBCVersion.java:26)
  at TestJDBCVersion.main(TestJDBCVersion.java:12)
java.lang.NullPointerException
  at TestJDBCVersion.version(TestJDBCVersion.java:37)
  at TestJDBCVersion.main(TestJDBCVersion.java:12)


Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms