"java.sql.SQLRecoverableException: IO Error: could not resolve the connect identifier <TNS ADMIN>" While Connecting Cloudera To An ADW Database
(Doc ID 2793335.1)
Last updated on OCTOBER 17, 2022
Applies to:
JDBC - Version 18.5 and laterInformation in this document applies to any platform.
Symptoms
Unable to connect to ADW from Cloudera (on AWS) using JDBC
While running a SQOOP command from a server to read data from an AWS using jdbc, the next error is reported.
The connect string used is of the next format:
"jdbc:oracle:thin:@<TNS ENTRY>?TNS_ADMIN=/<DIR>"
ERROR
-----------------------
21/07/02 14:20:14 INFO .....Impl: Submitted application .....
21/07/02 14:20:14 INFO .....Job: The url to track the job: https://....
21/07/02 14:20:14 INFO .....Job: Running job: job_<ID>
21/07/02 14:20:21 INFO .....Job: Job job_<ID> running in uber mode : false
21/07/02 14:20:21 INFO .....Job: map 0% reduce 0%
21/07/02 14:20:27 INFO .....Job: Task Id : attempt_...., Status : FAILED
Error: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLRecoverableException: IO Error: could not resolve the connect identifier "<TNS ENTRY>"
at org.apache.sqoop.mapreduce.db.DBInputFormat.setDbConf(DBInputFormat.java:167)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:158)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:77)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:137)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:763)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168)
Caused by: java.lang.RuntimeException: java.sql.SQLRecoverableException: IO Error: could not resolve the connect identifier "<TNS ENTRY>"
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:220)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setDbConf(DBInputFormat.java:165)
... 10 more
Caused by: java.sql.SQLRecoverableException: IO Error: could not resolve the connect identifier "<TNS ENTRY>"
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:858)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:57)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.sqoop.mapreduce.db.DBConfiguration.getConnection(DBConfiguration.java:300)
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:213)
... 11 more
Changes
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 |
Changes |
Cause |
Solution |