I am trying to generate input files using Java. I have raw data in a CSVfile, which Java reads and then uses GenericDatum/Record to create Avrofiles. The avro file is valid as it is parsed properly by avrocat.

> Hi All,>> I am trying to generate input files using Java. I have raw data in a CSV> file, which Java reads and then uses GenericDatum/Record to create Avro> files. The avro file is valid as it is parsed properly by avrocat.>> But, I get this error when I try to load it in Pig grunt :>> DEFINE AVRO_STORAGE org.apache.pig.piggybank.storage.avro.AvroStorage();>> logdata = LOAD>> '/Users/xxxx/Documents/workspace/DP-1147/apache-traffic-export/target/test-classes/output.avro'> USING AVRO_STORAGE();>> 2013-01-25 16:25:06,067 [main] ERROR org.apache.pig.tools.grunt.Grunt -> ERROR 1200: Pig script failed to parse:> <line 4, column 10> pig script failed to validate:> java.lang.RuntimeException: could not instantiate> 'org.apache.pig.piggybank.storage.avro.AvroStorage' with arguments 'null'> Details at logfile: /Users/xxxx/pig_1359157245908.log>>> What should I be using instead?>> - Meg>

Please change the paths to the jar files according to your environment. Isuppose that you've already registered piggubank.jar since the class nameof AvroStorage was resolved. But you probably didn't register the others.