avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moderator <cutt...@apache.org>
Subject Re: Null pointer error with ReflectData.getProtocol
Date Fri, 31 Jul 2009 20:38:17 GMT
tazan007 wrote:
> Exception in thread "main" java.lang.NullPointerException
>     at 
> org.apache.avro.reflect.ReflectData.createSchema(ReflectData.java:153)

In the 1.0.0 source, ReflectData.java:153 is:

   String space = c.getPackage().getName();

So it seem that if you don't declare a package the package of a class is
null, and Avro's reflect code does not check for that.  As a workaround
you can put your class into a package.

I've created a bug report to track this:



View raw message