Error Description:
Since my Hadoop cluster is automatically installed with Cloudera Manager online, their installation path must follow the Cloudera rules, and only see the official documentation for Cloudera, see:/http Www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cdh_ig_jdbc_driver_install.html
According to the official website, in the corresponding/var/lib/sqoop directory (official network said do not put in the/opt/cloudera/parcels/cdh-5.4.4-1.cdh5.4.4.p0.4/lib/sqoop/lib/directory, The reason is that when the version of CDH is upgraded, the directory is rewritten, and the previously added jar is deleted. ), add the appropriate driver package, and then connect the database for testing.
If Oracle executes sqoop list-databases--connect jdbc:oracle:thin:@//192.168.27.235:1521/orcl--username datacenter-p to test the correct connection to the database
For example, MySQL executes sqoop list-databases--connect jdbc:mysql://192.168.19.88:3306--username clear-p to test whether The database can be connected correctly
However, the following problems occur:
Problem: A nullpointexception error occurred while connecting to Oracle. The error is as follows
At first I thought it was me. The problem of adding the driver package location, but if the problem of adding driver package errors, the reported error should not be nullpointexception, but:
Then I knew I had an error when I entered the command line:
Sqoop list-databases--connect JDBC:ORACLE:THIN:@//192.168.27.235:1521:ORCL--username datacenter-p
The right one should be
Sqoop list-databases--connect JDBC:ORACLE:THIN:@//192.168.27.235:1521/ORCL--username datacenter-p
There is only one backslash problem.
Sqoop connecting Oracle and MYSQL&MARIADB errors