You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by ๏̯͡๏ <ÐΞ€ρ@Ҝ>, de...@gmail.com on 2013/04/25 06:46:52 UTC

java.lang.NoClassDefFoundError: dk/brics/automaton/Automaton

I am using PigServer to run a pig script that communicates with a
psuedo-distributed hadoop installation on my localbox. I have included
*-site.xml in CLASSPATH.
While running the pig script i get the following exception
Exception in thread "main" java.lang.NoClassDefFoundError:
dk/brics/automaton/Automaton
    at
org.apache.pig.impl.util.JarManager$DefaultPigPackages.<clinit>(JarManager.java:99)
    at org.apache.pig.impl.util.JarManager.createJar(JarManager.java:136)
    at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:517)
    at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:294)
    at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:177)


Code
====
PigServer pigServer = new PigServer(ExecType.MAPREDUCE);
      Data data = Storage.resetData(pigServer);
      Collection<Tuple> list = new ArrayList<Tuple>();
      for (int i = 0; i < ROW_COUNT; i++) {
        Tuple tuple = TupleFactory.getInstance().newTuple(COLUMN_COUNT);
        for (int j = 0; j < COLUMN_COUNT; j++) {
          tuple.set(j, "a" + i + "_" + j);
        }
        list.add(tuple);
      }
      pigServer.setBatchOn();
      pigServer.registerQuery("A = LOAD 'in' USING mock.Storage();");
      pigServer.deleteFile(out);
      if (pigServer.executeBatch().get(0).getStatus() !=
JOB_STATUS.COMPLETED) {
        throw new RuntimeException("Job failed",
pigServer.executeBatch().get(0).getException());
      }

===

Does PigServer expect anyother resources in CLASSPATH.
Above pig script works fine with  ExecType.LOCAL
-- 
Deepak