title: PIG UDF in JAVA ERROR 1070
body: <p>I have created <code>UDF_UPPER.jar</code> file in <code>/home/GED385/pigScripts</code>.</p>
  
  <pre><code>[GED385@snshadoope1 pigScripts]$ jar tf /home/GED385/pigScripts/UDF_UPPER.jar | grep UPPER
  UPPER.class
  </code></pre>
  
  <p>But while executing the pig i am getting below error.</p>
  
  <pre><code>grunt&gt; exec digital_web_trkg_9.pig
  2012-11-30 00:15:32,027 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve UDF_UPPER.UPPER using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
  Details at logfile: /data/1/GED385/pigScripts_digital/pig_1354233151486.log
  </code></pre>
  
  <p>PIg scripts:</p>
  
  <pre><code>REGISTER /usr/lib/pig/contrib/piggybank/java/piggybank.jar;
  REGISTER /home/GED385/pigScripts/UDF_UPPER.jar;
  
  A = LOAD '/user/GED385/digital/scrn_rsln_id_cln.dat' USING PigStorage('|')
                    AS (web_vstr_scrn_rsln_id:int,web_vstr_scrn_rsln_desc :chararray, edw_publn_id:chararray);
  
  B = LOAD '/user/GED385/digital/scrn_rsln_id1_cln.dat' USING PigStorage('|')
                    AS (web_vstr_scrn_rsln_id:int,web_vstr_scrn_rsln_desc :chararray, edw_publn_id:chararray);
  
  H = LOAD '/user/GED385/digital/scrn_rsln_id_base_unload_cln.dat' USING PigStorage('|')
                    AS (web_vstr_scrn_rsln_id_1:int,web_vstr_scrn_rsln_desc :chararray, edw_publn_id:chararray);
  
  J = GROUP H BY edw_publn_id;
  
  K = FOREACH J GENERATE group,  MAX(H.web_vstr_scrn_rsln_id_1);
  
  C = UNION A, B;
  
  D = FILTER C BY web_vstr_scrn_rsln_desc is not null;
  
  E = DISTINCT D;
  
  F = JOIN E BY web_vstr_scrn_rsln_desc LEFT , H BY web_vstr_scrn_rsln_desc;
  
  I = FILTER F BY H::web_vstr_scrn_rsln_id_1 is null;
  
  --G = FOREACH I GENERATE H::web_vstr_scrn_rsln_id_1,E::web_vstr_scrn_rsln_desc,E::edw_publn_id;
  G = FOREACH I GENERATE K.$1+1,E::web_vstr_scrn_rsln_desc,E::edw_publn_id,UDF_UPPER.UPPER(E::web_vstr_scrn_rsln_desc);
  
  --L = JOIN G BY $2 LEFT , K BY $0;
  
  DUMP G;
  </code></pre>