title: how to solve "Error during parsing. could not instantiate" in pig?
body: <p>Hello every one i am new in Pig i am trying following pig script : </p>
  
  <p>then it shows following error :
  ERROR 1000: Error during parsing. could not instantiate 'UPER' with arguments 'null' Details at logfile: /home/training/pig_1371303109105.log</p>
  
  <p>my Pig script:</p>
  
  <pre><code>register udf.jar; 
  A = LOAD 'data1.txt' USING PigStorage(',') AS (name:chararray, class:chararray, age:int);
  B = foreach A generate UPER(class);
  </code></pre>
  
  <p>I follow <a href="http://pig.apache.org/docs/r0.10.0/udf.html" rel="nofollow">this</a> tutorial .</p>
  
  <p>My java class is :</p>
  
  <pre><code>enter code here
  
  
  import org.apache.pig.EvalFunc;
  import org.apache.pig.data.Tuple;
  import java.io.*;
  
  public class UPER extends EvalFunc&lt;String&gt;{
  
      @Override
      public String exec(Tuple input) throws IOException {
          // TODO Auto-generated method stub
          if(input == null ||input.size() ==0)
           return null;
           try
           {
              String str=(String)input.get(0); 
              return str.toUpperCase(); 
           }
            catch(Exception e){
                throw new IOException("Caught exception processing input row ", e);
  
  
            }}
  }
  </code></pre>