Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Cannot compile generated classes in Java


Copy link to this message
-
Cannot compile generated classes in Java
Hi!

I followed the instructions at [1] but am unable to compile the schemas I
defined.
The problem is casting from Object to another type and it looks like it's
the same as here [2].

For example:
        this.device = data().deepCopy(fields()[1].schema(), other.device);
The RHS is of type Object.

[2] mentions that the problem is with Maven's Avro plugin but I can't
figure out how to fix it. I can't even get it working when compiling the
sources by hand:

java -jar
~/.m2/repository/org/apache/avro/avro-tools/1.7.4/avro-tools-1.7.4.jar
compile schema src/main/avro/ src/main/java

Please help!

[1] http://avro.apache.org/docs/current/gettingstartedjava.html
[2]
http://search-hadoop.com/m/5kwYILlAHw1/avro+incompatible+types&subj=1+7+3+regression+
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB