Sqoop Forum

Getting java.lang.NoSuchFieldError: IBM_JAVA while running Sqoop from Java

  • #48141
    Sourabh Potnis

    I am trying to run Sqoop from a Java program using Sqoop.runTool(str), to export data to Teradata from HDFS.

    While compiling, I have added following Jars:
    /etc/hadoop/conf:/usr/lib/sqoop/sqoop-, all jars in/usr/lib/sqoop/lib, /usr/lib/hadoop/hadoop-common-, all jars in /usr/lib/hadoop/lib, /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-core-, all jars in /usr/lib/hadoop-mapreduce, all jars in /usr/lib/hadoop-mapreduce/lib

    But when running the jar, getting following error:
    Exception in thread “main” java.lang.NoSuchFieldError: IBM_JAVA
    at org.apache.hadoop.security.UserGroupInformation.getOSLoginModuleName(UserGroupInformation.java:303)
    at org.apache.hadoop.security.UserGroupInformation.<clinit>(UserGroupInformation.java:348)
    at org.apache.hadoop.mapreduce.JobContext.<init>(JobContext.java:80)
    at org.apache.hadoop.mapreduce.Job.<init>(Job.java:100)
    at org.apache.sqoop.mapreduce.ExportJobBase.runExport(ExportJobBase.java:382)
    at org.apache.sqoop.teradata.TeradataConnManager.exportTable(TeradataConnManager.java:109)
    at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:81)
    at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:100)
    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 SqoopTest.exportHDFSToSQL(SqoopTest.java:20)
    at SqoopTest.main(SqoopTest.java:46)

    (From a command line Sqoop export is working fine.)


to create new topics or reply. | New User Registration

  • Author
  • #48235
    Robert Molina

    Hi Sourabh,
    Maybe the following may help:


    Sourabh Potnis


    Thanks Robert.

    I have gone through this post before.

    I have compiled my Java program correctly with all dependencies.

    The problem (Exception in thread “main” java.lang.NoSuchFieldError: IBM_JAVA )arises when I am trying to run the jar.

    Java version:
    java version “1.6.0_24”
    OpenJDK Runtime Environment (IcedTea6 (rhel-
    OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

    On HDP Hadoop


    Robert Molina

    Hi Sourabh,
    Can you try installing a certified version of JDK with the HDP cluster you have? Here is the link:

    The following Java runtimes are supported:

    Oracle JDK 1.6.0_31 64-bit

    Oracle JDK 1.7 64-bit

    OpenJDK 7 64-bit


The topic ‘Getting java.lang.NoSuchFieldError: IBM_JAVA while running Sqoop from Java’ is closed to new replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.