Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

SOLVED: Sqoop connector for teradata error

Solved Go to solution

SOLVED: Sqoop connector for teradata error


We just finished installing the teradata connector for Sqoop along with the Teradata JDBC driver. Problem is, when we try to run a sample import, we get the following error:


sqoop import --driver com.teradata.jdbc.TeraDriver --connect jdbc:teradata&colon;//<server>/DATABASE=<database> --username <user> --P --table <sample table> --num-mappers 3 --verbose
Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /opt/cloudera/parcels/CDH-4.6.0-1.cdh4.6.0.p0.26/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
14/04/18 10:19:07 INFO sqoop.Sqoop: Running Sqoop version: 1.4.3-cdh4.6.0
14/04/18 10:19:07 DEBUG tool.BaseSqoopTool: Enabled debug logging.
Enter password:
14/04/18 10:19:11 DEBUG util.ClassLoaderStack: Checking for existing class: cloudera.connector.teradata.TeradataManagerFactory
14/04/18 10:19:11 DEBUG util.ClassLoaderStack: Attempting to load jar through URL: jar:file:/opt/cloudera/parcels/CDH-4.6.0-1.cdh4.6.0.p0.26/lib/sqoop/lib/sqoop-connector-teradata-1.2c4.jar!/
14/04/18 10:19:11 DEBUG util.ClassLoaderStack: Previous classloader is sun.misc.Launcher$AppClassLoader@63c78e57
14/04/18 10:19:11 DEBUG util.ClassLoaderStack: Testing class in jar: cloudera.connector.teradata.TeradataManagerFactory
14/04/18 10:19:11 ERROR sqoop.ConnFactory: Error loading ManagerFactory information from file /opt/cloudera/parcels/CDH-4.6.0-1.cdh4.6.0.p0.26/bin/../lib/sqoop/conf/managers.d/teradata_connector: Could not load jar /opt/cloudera/parcels/CDH-4.6.0-1.cdh4.6.0.p0.26/lib/sqoop/lib/sqoop-connector-teradata-1.2c4.jar into JVM. (Could not find class cloudera.connector.teradata.TeradataManagerFactory.)
at org.apache.sqoop.util.ClassLoaderStack.addJarFile(
at com.cloudera.sqoop.util.ClassLoaderStack.addJarFile(
at org.apache.sqoop.ConnFactory.addManagersFromFile(
at org.apache.sqoop.ConnFactory.loadManagersFromConfDir(
at org.apache.sqoop.ConnFactory.instantiateFactories(
at org.apache.sqoop.ConnFactory.<init>(
at com.cloudera.sqoop.ConnFactory.<init>(
at org.apache.sqoop.tool.BaseSqoopTool.init(
at org.apache.sqoop.tool.ImportTool.init(
at org.apache.sqoop.Sqoop.runSqoop(
at org.apache.sqoop.Sqoop.runTool(
at org.apache.sqoop.Sqoop.runTool(
at org.apache.sqoop.Sqoop.main(
Caused by: java.lang.ClassNotFoundException: cloudera.connector.teradata.TeradataManagerFactory
at Method)
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at org.apache.sqoop.util.ClassLoaderStack.addJarFile(
... 15 more

14/04/18 10:19:11 ERROR sqoop.ConnFactory: Could not load ManagerFactory cloudera.connector.teradata.TeradataManagerFactory (not found)


Could the problem be related to the CLASSPATH or it's something else?

Any help would be greatly appreciated.


(CDH 4.6.0 + Sqoop 1.4.3+92)



**** Update ****

We changed the import command by adding the --driver com.teradata.jdbc.TeraDriver option. We still get the "not found" error reported above, but at least Sqoop is able to move on and complate the process after posting the following message:


14/04/18 11:02:14 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.


**** Solved ****

The file in managers.d in the Sqoop configuration directory had the wrong class name. Instead of reading com.cloudera.connector.teradata.TeradataManagerFactory it read cloudera.connector.teradata.TeradataManagerFactory.


Accepted Solutions

Re: SOLVED: Sqoop connector for teradata error


Re: SOLVED: Sqoop connector for teradata error

Cloudera Employee

I'm glad to see that you were able to overcome the issue!


We have very good documenation how to properly install the connector available on the following page:


Also in addition we've fully automated the installation in our Cloudera Manager 5 and for CDH 5.


Re: SOLVED: Sqoop connector for teradata error

Don't have an account?
Coming from Hortonworks? Activate your account here