Hi, The jar you built is a bundle jar, and java won't include jar files inside a jar file to classpath. Please expand the jar and have all the jars included in the classpath. You also need to include the directory to your hadoop conf in the classpath as well. E.g:
jar -xf twillsample-0.0.1-SNAPSHOT.one-jar.jar java -cp .:main/*:lib/*:/etc/hadoop/conf <main_class_name> <args...> Terence On Fri, Jan 6, 2017 at 6:27 AM, Krishnachaitanya C Potluri < krishnachaitanya_c_potl...@progressive.com> wrote: > Hi, > > > > Please see attached. > > > > -Krishna > > *From:* Terence Yim [mailto:cht...@gmail.com] > *Sent:* Thursday, January 05, 2017 10:59 PM > *To:* Krishnachaitanya C Potluri <Krishnachaitanya_C_Potluri@Pr > ogressive.com> > *Subject:* Re: Twill example issue > > > > Hi, > > > > From the pom, seems like you are not building a fat jar, meaning the > classes that your project depends on won't be included in the resulting jar > (twillsample-0.0.1-SNAPSHOT.one-jar.jar in your case). Or maybe you are? > Do you mind showing me the content of your > twillsample-0.0.1-SNAPSHOT.one-jar.jar > file by running "jar -tf > twillsample-0.0.1-SNAPSHOT.one-jar.jar"? > > > > Terence > > > On Jan 4, 2017, at 7:20 AM, Krishnachaitanya C Potluri < > krishnachaitanya_c_potl...@progressive.com> wrote: > > Hello Terence, > > > > I am using Maven, so I think I pretty much have all the jars. > > > > <parent> > > <groupId>com.progressive.bigdata</groupId> > > <artifactId>*hdpparent*</artifactId> > > <version>LATEST</version> > > </parent> > > > > <dependencies> > > <dependency> > > <groupId>org.apache.twill</groupId> > > <artifactId>twill-yarn</artifactId> > > <version>0.8.0</version> > > <exclusions> > > <exclusion> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-*hdfs*</artifactId> > > </exclusion> > > <exclusion> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-common</artifactId> > > </exclusion> > > <exclusion> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-yarn-client</artifactId> > > </exclusion> > > <exclusion> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-yarn-*api*</artifactId> > > </exclusion> > > <exclusion> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-annotations</artifactId> > > </exclusion> > > <exclusion> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-yarn-common</artifactId> > > </exclusion> > > <exclusion> > > <groupId>io.netty</groupId> > > <artifactId>*netty*</artifactId> > > </exclusion> > > <exclusion> > > <groupId>ch.qos.logback</groupId> > > <artifactId>*logback*-core</artifactId> > > </exclusion> > > <exclusion> > > <groupId>ch.qos.logback</groupId> > > <artifactId>*logback*-classic</artifactId> > > </exclusion> > > <exclusion> > > <groupId>org.apache.kafka</groupId> > > <artifactId>kafka_2.10</artifactId> > > </exclusion> > > <exclusion> > > <groupId>*com*.101tec</groupId> > > <artifactId>*zkclient*</artifactId> > > </exclusion> > > <exclusion> > > <groupId>com.yammer.metrics</groupId> > > <artifactId>metrics-annotation</artifactId> > > </exclusion> > > </exclusions> > > </dependency> > > <dependency> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-yarn-*api*</artifactId> > > <version>2.7.1.2.3.4.7-4</version> > > </dependency> > > <dependency> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-yarn-client</artifactId> > > <version>2.7.1.2.3.4.7-4</version> > > </dependency> > > > > <dependency> > > <groupId>org.apache.kafka</groupId> > > <artifactId>kafka_2.10</artifactId> > > <version>0.8.0</version> > > <exclusions> > > <exclusion> > > <groupId>*com*.101tec</groupId> > > <artifactId>*zkclient*</artifactId> > > </exclusion> > > </exclusions> > > </dependency> > > > > <dependency> > > <groupId>*com*.101tec</groupId> > > <artifactId>*zkclient*</artifactId> > > <version>0.3</version> > > </dependency> > > > > <dependency> > > <groupId>org.apache.zookeeper</groupId> > > <artifactId>*zookeeper*</artifactId> > > <version>3.4.3</version> > > </dependency> > > <dependency> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-common</artifactId> > > <version>2.7.1.2.3.4.7-4</version> > > </dependency> > > <dependency> > > <groupId>org.apache.hadoop</groupId> > > <artifactId>*hadoop*-*mapreduce*-client-core</artifactId> > > <version>2.7.1.2.3.4.7-4</version> > > </dependency> > > Thanks, > > > > *Krishna Potluri* > > > >