Support Questions
Find answers, ask questions, and share your expertise
Announcements
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
Highlighted

SOLVED: Sqoop connector for teradata error

Contributor

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: java.io.IOException: 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(ClassLoaderStack.java:92)
at com.cloudera.sqoop.util.ClassLoaderStack.addJarFile(ClassLoaderStack.java:36)
at org.apache.sqoop.ConnFactory.addManagersFromFile(ConnFactory.java:235)
at org.apache.sqoop.ConnFactory.loadManagersFromConfDir(ConnFactory.java:294)
at org.apache.sqoop.ConnFactory.instantiateFactories(ConnFactory.java:85)
at org.apache.sqoop.ConnFactory.<init>(ConnFactory.java:62)
at com.cloudera.sqoop.ConnFactory.<init>(ConnFactory.java:36)
at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:242)
at org.apache.sqoop.tool.ImportTool.init(ImportTool.java:84)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:494)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
Caused by: java.lang.ClassNotFoundException: cloudera.connector.teradata.TeradataManagerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.sqoop.util.ClassLoaderStack.addJarFile(ClassLoaderStack.java:88)
... 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.

Thanks!

(CDH 4.6.0 + Sqoop 1.4.3+92)

MC.

 

**** 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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: SOLVED: Sqoop connector for teradata error

Contributor
2 REPLIES 2

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:

 

http://www.cloudera.com/content/cloudera-content/cloudera-docs/Connectors/Teradata/Cloudera-Connecto...

 

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

Highlighted

Re: SOLVED: Sqoop connector for teradata error

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