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 Plain View
Avro >> mail # user >> Cannot compile generated classes in Java


+
Dan Filimon 2013-07-01, 13:41
+
Dan Filimon 2013-07-02, 07:22
Copy link to this message
-
Re: Cannot compile generated classes in Java
Are you certain that only the correct version of Avro is on the
classpath when compiling?  Perhaps try running javac on the file from
the command line, constructing the classpath by hand, to be certain.

Doug

On Tue, Jul 2, 2013 at 12:22 AM, Dan Filimon
<[EMAIL PROTECTED]> wrote:
> I got the same code to work using Avro pre-1.7.3. But why isn't it working
> afterwards?
> All the JARs seem to be the right version.
>
>
> On Mon, Jul 1, 2013 at 4:41 PM, Dan Filimon <[EMAIL PROTECTED]>
> wrote:
>>
>> 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