Hi Sandeep,

The first error definitively indicates a classloading issue, which may also
be the cause for the second error.

Can you describe where you put your jar inside the docker image and which
execution mode you are using? As a general rule, the jar is not supposed to
go into flink/lib.
Also make sure to never shade non-connector classes of Flink into your jar.
A typical user jar should be ~1MB.

On Fri, Mar 19, 2021 at 8:58 PM Sandeep khanzode <sand...@shiftright.ai>
wrote:

> Hello,
>
> I have a fat JAR compiled using the Man Shade plugin and everything  works
> correctly when I deploy it on a standalone local cluster i.e. one job and
> one task manager node.
>
> But I installed Minikube and the same JAR file packaged into a docker
> image fails with weird serialization  errors:
>
> Caused by: java.lang.ClassCastException: cannot assign instance of
> java.lang.invoke.SerializedLambda to field
> org.apache.flink.streaming.runtime.partitioner.KeyGroupStreamPartitioner.keySelector
> of type org.apache.flink.api.java.functions.KeySelector in instance of
> org.apache.flink.streaming.runtime.partitioner.KeyGroupStreamPartitioner
>
>
> … or in certain cases, if I comment out everything except the Kafka
> Source, then ...
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.kafka.common.requests.MetadataRequest$Builder
>
>
> Is there anything I am missing with the Minikube setup? I initially tried
> with the steps for the Job Application cluster on the website, but I was
> unable to get the /usrlib mounted from the hostpath.
>
>
> So, I created a simple docker image from ...
>
> apache/flink:1.12.1-java11
>
>
> But I have not had any success getting the same job to run here. Please
> let me know if there are well-known steps or issues that I can check.
>
> Thanks,
> Sandeep
>

Reply via email to