title: org.apache.pig.backend.executionengine.ExecException: ERROR 0: java.lang.reflect.InvocationTargetException
body: <p>I am running this pig script</p>
  
  <pre><code>DEFINE UrlDecode InvokeForString('java.net.URLDecoder.decode', 'String String');
  A = LOAD ' /user/olap/data/pagecounts-20071231-230000' using PigStorage(' ','-tagsource') AS (a1:chararray, a2:chararray,a3:chararray,a4:int,a5:int);
  Z = FOREACH A  GENERATE SUBSTRING((chararray)$0, 20, 24),SUBSTRING((chararray)$0, 11, 19),a2,UrlDecode((chararray)a3,'UTF-8'),a4,a5;
  STORE Z INTO '/user/olap/data/wiki_data_intemediate/2013-06_fullprocessed' USING PigStorage ('\t');
  </code></pre>
  
  <p>on It's Execution these are the logs</p>
  
  <h2>Backend error message</h2>
  
  <pre><code>org.apache.pig.backend.executionengine.ExecException: ERROR 0: java.lang.reflect.InvocationTargetException
      at org.apache.pig.builtin.Invoker.invoke(Invoker.java:242)
      at org.apache.pig.builtin.GenericInvoker.exec(GenericInvoker.java:99)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:337)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:434)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:340)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:372)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:297)
      at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:283)
      at org.apache.pig.backend.hadoop.executionengine.m
  </code></pre>
  
  <h2>Pig Stack Trace</h2>
  
  <p>====================================================    ERROR 0: java.lang.reflect.InvocationTargetException</p>
  
  <pre><code>org.apache.pig.backend.executionengine.ExecException: ERROR 0: java.lang.reflect.InvocationTargetException
      at org.apache.pig.builtin.Invoker.invoke(Invoker.java:242)
      at org.apache.pig.builtin.GenericInvoker.exec(GenericInvoker.java:99)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:337)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:434)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:340)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:372)
      at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:297)
      at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:283)============================
  </code></pre>
  
  <p>Please tell me what am i doing wrong???
  My Input file is of format</p>
  
  <pre><code>%D0%90%D1%83%D1%81%D1%83%D0%BC%D2%AD%D0%B0%D2%9B%D3%99%D0%B0 1 1
  ab %D0%90%D2%A7%D1%81%D0%BD%D1%8B%D1%82%D3%99%D0%B8_%D0%90%D0%B2%D1%82%D0%BE%D0%BD%D0%BE%D0%BC%D1%82%D3%99%D0%B8_%D0%A0%D0%B5%D1%81%D0%BF%D1%83%D0%B1%D0%BB%D0%B8%D0%BA%D0%B0 1 1
  ab %D0%98%D1%85%D0%B0%D0%B4%D0%BE%D1%83_%D0%B0%D0%B4%D0%B0%D2%9F%D1%8C%D0%B0 3 3
  ab %D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F:%D0%90%D2%A7%D1%81%D1%83%D0%B0%D0%B0_%D0%A0%D1%8B%D0%B1%D0%B6%D1%8C%D1%8B 1 1
  ab %D0%A1%D0%B5%D1%80%D0%B3%D0%B5%D0%B8_%D0%91%D0%B0%D0%B3%D0%B0%D2%A7%D1%88%D1%8C 1 1
  ab %D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Imagelist 1 1
  ab %D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Listadmins 1 1
  ab %D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Listusers 1 1
  ab %D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Listusers/sysop 1 1
  ab %D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random 1 1
  ab %D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Recentchanges 1 1
  ab %D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:AlleborgoBot 1 1
  ab %D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Escarbot 1 1
  ab %D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Multichill 1 1
  ab %D0%A4%D0%B8%D0%BD%D0%B0%D0%BD%D1%81%D1%8B 1 1
  ab %D2%9E%D0%B0%D0%B1%D0%B0%D1%80%D0%B4%D0%B0-%D0%91%D0%B0%D0%BB%D2%9
  </code></pre>
  
  <p>in variable <code>Z</code> I am appending date time columns and also decoding the encoded string</p>
  
  <p>Please help me understand the error</p>