Problem Description:

Export to teradata is failing with java.io.IOException: java.lang.ClassNotFoundException: org.apache.sqoop.teradata.TeradataConnManager and the sample stack trace looks like below,

[main] ERROR org.apache.sqoop.ConnFactory  - Sqoop could not found specified connection manager class org.apache.sqoop.teradata.TeradataConnManager. Please check that you've specified the class correctly.
21/08/13 19:36:21 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException: java.lang.ClassNotFoundException: org.apache.sqoop.teradata.TeradataConnManager
    at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:166)
    at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:280)
    at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:89)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:139)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:171)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:209)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:217)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:227)
Caused by: java.lang.ClassNotFoundException: org.apache.sqoop.teradata.TeradataConnManager
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:147)
    ... 8 more


Root cause

This error occurs if the hortonworks-teradata-connector-1.5.4.2.6.5.0-292.jar is not present or not added to iw_export_classpath in conf.properties file.


Solution:

a) Login to Infoworks edge node as the user who starts infoworks services and download the attached jar.

b) Copy the jar to /opt/infoworks/lib/teradata directory and make sure infoworks user has read/write/execute permissions on this jar.

c) Append /opt/infoworks/lib/teradata/hortonworks-teradata-connector-1.5.4.2.6.5.0-292.jar to the beginning of iw_export_classpath in conf.properties file.

d) Run the Export job again.


Applicable IWX versions:

IWX 3.X