The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

HBase Forum

Bulkupload – : java.lang.NoClassDefFoundError: au/com/bytecode/opencsv/CSVParser

  • #51603

    Hi All,
    I’m trying to perform a bulk upload using the example here:
    I’ve created my own java program and have packaged it in a jar – bulkupload-1.0.jar. I’m doing the following:
    1. export HADOOP_CLASSPATH=/etc/hbase/conf:/usr/lib/hbase/lib/*:./hbase-server-0.96.2-hadoop2.jar:./opencsv-2.3.jar:./bulkupload-1.0.jar
    2. hadoop jar bulkupload-1.0.jar com.bulkupload.JobDriver

    I’m getting the following error:
    14/04/15 22:23:27 INFO mapreduce.Job: Task Id : attempt_1397617091118_0005_m_000001_2, Status : FAILED
    Error: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.apache.hadoop.util.ReflectionUtils.newInstance(
    at org.apache.hadoop.mapred.MapTask.runNewMapper(
    at org.apache.hadoop.mapred.YarnChild$
    at Method)
    at org.apache.hadoop.mapred.YarnChild.main(
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
    at java.lang.reflect.Constructor.newInstance(
    at org.apache.hadoop.util.ReflectionUtils.newInstance(
    … 7 more
    Caused by: java.lang.NoClassDefFoundError: au/com/bytecode/opencsv/CSVParser
    at com.bulkupload.MyKVMapper.<init>(
    … 12 more
    Caused by: java.lang.ClassNotFoundException:
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(

    Can anyone help me with this or point me in the right direction?

    Thanks in advance.

  • Author
  • #52061

    Ended up having to run these commands and it worked:
    export HADOOP_CLASSPATH=/etc/hbase/conf:/usr/lib/hbase/lib/*:./hbase-server-0.96.2-hadoop2.jar:./opencsv-2.3.jar:./hbase-protocol-0.96.2-hadoop2.jar:./bulkupload-1.0.jar

    hadoop jar bulkupload-1.0.jar com.bulkupload.JobDriver -libjars opencsv-2.3.jar,hbase-protocol-0.96.2-hadoop2.jar /temp/input/file.csv /temp/output_jackie

The forum ‘HBase’ is closed to new topics and 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.