Open fishercoder1534 opened 7 years ago
try with:
SCHEMA = new Schema.Parser().parse(new File("Employee.avsc")); SCHEMA2 = new Schema.Parser().parse(new File("Employee2.avsc"));
final InputStream pageViewRegionSchema = PageStream.class.getClassLoader() .getResourceAsStream("apache/src/main/avro/pageviewregion.avsc"); final Schema schema = new Schema.Parser().parse(pageViewRegionSchema);
when run the program , it display error : How to fix ?
Exception in thread "main" java.lang.NullPointerException at org.apache.avro.Schema.parse(Schema.java:1225) at org.apache.avro.Schema$Parser.parse(Schema.java:1032) at org.apache.avro.Schema$Parser.parse(Schema.java:1004) at com.kafka.stream.apache.PageStream.main(PageStream.java:90)
Hi Robert,
Thanks for creating this awesome project, but after copying your code, I run into NullPointerException when trying to run it. It's this line: https://github.com/rfoldes/Avro-Test/blob/master/src/avro/Employee.java#L28 that throws it. Here's the stacktrace:
Line numbers don't match exactly, but it's this line: https://github.com/rfoldes/Avro-Test/blob/master/src/avro/Employee.java#L28 in the master branch that throws it.
Any ideas/fix please?