[jira] [Created] (FLINK-18845) class not found exception when i use sql client to try mysql as datasource.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-18845) class not found exception when i use sql client to try mysql as datasource.

Shang Yuanchun (Jira)
HuiyuZhou created FLINK-18845:
---------------------------------

             Summary: class not found exception when i use sql client to try mysql as datasource.
                 Key: FLINK-18845
                 URL: https://issues.apache.org/jira/browse/FLINK-18845
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Client
    Affects Versions: 1.11.0
         Environment: sql-client startup cmd as following:

./bin/sql-client.sh embedded
            Reporter: HuiyuZhou
         Attachments: flink-root-standalonesession-2-jqdev-l-01897.jqdev.shanghaigm.com.log

Create table as following:

USE CATALOG default_catalog;
USE default_database;
DROP TABLE IF EXISTS CarsOfFactory;
CREATE TABLE CarsOfFactory (
 TS STRING,
 MANUFACTURE_PLANT STRING,
 STAGE STRING,
 CAR_NO BIGINT,
 UPDATE_TIME TIMESTAMP,
 PRIMARY KEY (TS,MANUFACTURE_PLANT,STAGE) NOT ENFORCED
) WITH (
 'connector' = 'jdbc',
 'url' = 'jdbc:mysql://xxxx',
 'table-name' = 'CarsOfFactory',
 'username' = 'xxxx',
 'password' = 'xxxxx'
);

 

the sql client startup log as following:

[^flink-root-standalonesession-2-jqdev-l-01897.jqdev.shanghaigm.com.log]

 

i also use arthas to check the class of JdbcRowDataInputFormat, it doesn't exsit.

[arthas@125257]$ getstatic org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat *
No class found for: org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat
Affect(row-cnt:0) cost in 29 ms.

 

 

the detail error message in Apache Flink Dashboard as following:
2020-08-07 10:54:15
org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot load user class: org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat
ClassLoader info: URL ClassLoader:
file: '/tmp/blobStore-20e8ab84-2215-4f5f-b5bb-e7672a43fb43/job_aad9c3d36483cff4d20cc2aba399b8c0/blob_p-0b002ebba0e49cbf5ac62789e6b4fb299b5ae235-8fe568bdcd98caf8fb09c58092083ef4' (valid JAR)
Class not resolvable through given classloader.
    at org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperatorFactory(StreamConfig.java:288)
    at org.apache.flink.streaming.runtime.tasks.OperatorChain.<init>(OperatorChain.java:126)
    at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:453)
    at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:522)
    at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:721)
    at org.apache.flink.runtime.taskmanager.Task.run(Task.java:546)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at org.apache.flink.util.FlinkUserCodeClassLoader.loadClassWithoutExceptionHandling(FlinkUserCodeClassLoader.java:61)
    at org.apache.flink.util.ChildFirstClassLoader.loadClassWithoutExceptionHandling(ChildFirstClassLoader.java:65)
    at org.apache.flink.util.FlinkUserCodeClassLoader.loadClass(FlinkUserCodeClassLoader.java:48)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at org.apache.flink.util.InstantiationUtil$ClassLoaderObjectInputStream.resolveClass(InstantiationUtil.java:78)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1868)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1751)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2042)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
    at org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:576)
    at org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:562)
    at org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:550)
    at org.apache.flink.util.InstantiationUtil.readObjectFromConfig(InstantiationUtil.java:511)
    at org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperatorFactory(StreamConfig.java:276)
    ... 6 more



--
This message was sent by Atlassian Jira
(v8.3.4#803005)