to answer myself: I should have said I am creating the PCollection<Data> using Create.of which apparently leads to this getDefaultCoder() implementation: CoderRegistry.getDefaultCoder(T exampleValue) which doesn't try inspecting the annotation (as opposed CoderRegistry.getDefaultCoder(Class<T> clazz) ). So I guess I have to explicitly use the create.of().withCoder(). antony.
On Monday, 13 March 2017, 13:37, Antony Mayi <antonym...@yahoo.com> wrote: Hi, trying to create PCollection of my custom data class but keep failing due to the CannotProvideCoderException: My class is declared as follows: @DefaultCoder(SerializableCoder.class) public class Data<DataT extends BaseData> implements Serializable { and it fails like this: Caused by: org.apache.beam.sdk.coders.CannotProvideCoderException: Cannot provide coder based on value with class my.project.Data: No CoderFactory has been registered for the class. why it doesn't pick the coder? thanks,Antony.