````quote
I have the following field 
```
public List<List<String>> data;
```

That I need to serialise using protobuf (for infinispan-client).

I am trying to annotate the getter this way
```
    @ProtoField(number = 6)
    public List<List<String>> getData() {
        return data;
    }
```
But I got:
```
org.infinispan.protostream.annotations.ProtoSchemaBuilderException: The 
type java.util.List of field 'data' of xyz.property.data.model.GrowthStats 
should not be abstract.
```

Hence I created another class called Data:
```
@Setter
@EqualsAndHashCode
public class Data {

    List<String> stats;

    @ProtoField(number = 1, collectionImplementation = ArrayList.class)
    public List<String> getStats() {
        return stats;
    }
}
```
and modified the main class this way:

```
    public List<Data> data;

    @ProtoField(number = 6, collectionImplementation = ArrayList.class)
    public List<Data> getData() {
        return data;
    }
```
And I created this:
```
@AutoProtoSchemaBuilder(includeClasses = {GrowthStats.class, Data.class}, 
schemaPackageName = "stats.data.xyz.property")
public interface GrowthContextInitializer extends 
SerializationContextInitializer {
}
```
````

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/1f22dc00-1701-4fac-ba54-5b9932917bd1n%40googlegroups.com.

Reply via email to