You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Marke Builder <ma...@gmail.com> on 2018/11/17 10:48:23 UTC

Flink with Yarn and AbstractDeserializationSchema: ClassCastException

Hi,

I'm using the AbstractDeserializationSchema for my RabbitMQ source[1] and
try to deserialize the xml message with JAXB. The flink job are running
with YARN.
After the job was started I get follow exception:

javax.xml.bind.JAXBException: ClassCastException: attempting to cast
jar:file:/usr/java/jdk1.8.0_151/jre/lib/rt.jar!/javax/xml/bind/JAXBContext.class
to
jar:file:/mnt/disk02/yarn/nm/usercache/appcache/application_1541828054499_0140/blobStore-ab7c8d72-c1e6-4b4e-a3a2-9933d3a880e9/job_515b82c3012713c828bfbd2acfb6ddda/blob_p-a27f7b818ee20859f9516a364e3cf892017ef637-2fad0646d9aadfd01d4dabaf03feff84!/javax/xml/bind/JAXBContext.class.
Please make sure that you are specifying the proper ClassLoader.


[1]:
new AbstractDeserializationSchema<TimeSeriesType>() {
                            @Override
                            public TimeSeriesType deserialize(byte[] bytes)
throws IOException {
                                TimeSeriesType message = null;
                                try {
                                    message = xmlParser.parse(new
String(bytes, "UTF8"));
                                    LOG.info("Data/Message size: "
+String.valueOf(message.getData().size()));
                                } catch (JAXBException e) {
                                    e.printStackTrace();
                                    LOG.info(e.toString());
                                }
                                return message;
                            }
                        }))