avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Weimer <wei...@yahoo-inc.com>
Subject Re: Using the Specific Compiler in 1.4
Date Fri, 19 Nov 2010 00:28:51 GMT
Hi,

A classic "d'oh": I had leftovers of avro 1.2 in the class path which triggered this. Removing
those solved the issue.

Take care,

Markus


On 11/18/10 4:25 PM, "Markus Weimer" <weimer@yahoo-inc.com> wrote:

Hi,

I am trying to convert some java code from using 1.2 to 1.4. I tried a very
basic example, namely the following schema:

{
    "namespace":"avrotest",
    "protocol":"Test",
    "types":[
        {
            "type": "record",
            "name": "Line",
            "fields": [
                {"name": "theLine", "type":"string"}
            ]
        }
    ]
}

Then, I compiled this to java code using:

org.apache.avro.specific.SpecificCompiler

With no errors. However, the resulting Java code cannot be compiled. It
imports

org.apache.avro.reflect.FixedSize;

Which is not part of the avro jar I have, nor is it in the javadocs on the
apache site. Additionally, the generated class "Line" does not implement the
method "put" as required by the SpecificRecord interface.

I obviously must be missing something here, as others have used that API.
What is it that I am missing?

Thanks,

Markus



Mime
View raw message