Can you provide the full stacktrace? On Wed, Jul 8, 2020 at 12:33 PM Rui Wang <ruw...@google.com> wrote:
> Tried some code search in Beam repo but I didn't find the exact line > of code that throws your exception. > > However, I believe for Java Classes you used in primitives (ParDo, > CombineFn) and coders, it's very likely you need to make them > serializable (i.e. implements Serializable). > > > -Rui > > On Wed, Jul 8, 2020 at 6:23 AM Kirill Zhdanovich <kzhdanov...@gmail.com> > wrote: > > > > Hi! > > I'm using Apache Beam Java(2.19.0) with Dataflow. I created class and > annotated it with DefaultCoder > > > > @DefaultCoder(AvroCoder.class) > > public class ProductCatalog { > > > > When I trying to submit it to cluster I get an error: > > > > Caused by: java.io.NotSerializableException: ...common.ProductCatalog > > > > If I add `implements Serializable` to the class definition everything > works fine. In the Apache Beam guide, I don't see anything about using > implements Serializable. What I'm doing wrong? Thank you in advance for > your help >