avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandor Seres <sse...@code.hu>
Subject ReflectData.get().getSchema(ArrayList.class)
Date Mon, 09 Feb 2015 08:07:23 GMT
Hi,
I need to serialize a complex object having ArrayList<String> in it. I
need to put the serialized object into a MQ. I am trying to use Avro for
object serialization like this. 
---------Test---------------------------------
List list = new ArrayList<String>();
           Schema schema = ReflectData.get().getSchema(list.getClass());
------------------------------------------------
This is what I am getting
org.apache.avro.AvroRuntimeException: Can't find element type of
Collection
at
org.apache.avro.reflect.ReflectData.createSchema(ReflectData.java:435)
at
org.apache.avro.specific.SpecificData.getSchema(SpecificData.java:189)
-----------------------------------------------
I am completely sure that not I am the first to run into this problem,
but did not find any answer for such a question till now....
Any help?
Thanx
Sandor 

Mime
View raw message