kyoty opened a new issue #5808:
URL: https://github.com/apache/dolphinscheduler/issues/5808


   
   **Describe the bug**
   
   When we try to transfer data using datax between  different types of data 
sources, the worker will exit with ClassCastException
   
   
![image](https://user-images.githubusercontent.com/52202080/125315605-e0f29e80-e369-11eb-8b9c-a94d8faa9eda.png)
   
   ```java
   [INFO] 2021-07-12 23:36:28.682  - [taskAppId=TASK-545173233664_3-3-3]:[464] 
- try to execute sql analysis query column name
   [ERROR] 2021-07-12 23:36:28.688 
org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[171] - task 
scheduler failure
   java.lang.RuntimeException: java.lang.ClassCastException: 
org.apache.dolphinscheduler.common.datasource.clickhouse.ClickhouseConnectionParam
 cannot be cast to 
org.apache.dolphinscheduler.common.datasource.mysql.MysqlConnectionParam
        at 
org.apache.dolphinscheduler.common.datasource.DatasourceUtil.getConnection(DatasourceUtil.java:84)
        at 
org.apache.dolphinscheduler.server.worker.task.datax.DataxTask.tryExecuteSqlResolveColumnNames(DataxTask.java:557)
        at 
org.apache.dolphinscheduler.server.worker.task.datax.DataxTask.parsingSqlColumnNames(DataxTask.java:465)
        at 
org.apache.dolphinscheduler.server.worker.task.datax.DataxTask.buildDataxJobContentJson(DataxTask.java:286)
        at 
org.apache.dolphinscheduler.server.worker.task.datax.DataxTask.buildDataxJsonFile(DataxTask.java:215)
        at 
org.apache.dolphinscheduler.server.worker.task.datax.DataxTask.handle(DataxTask.java:166)
        at 
org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:159)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
   Caused by: java.lang.ClassCastException: 
org.apache.dolphinscheduler.common.datasource.clickhouse.ClickhouseConnectionParam
 cannot be cast to 
org.apache.dolphinscheduler.common.datasource.mysql.MysqlConnectionParam
        at 
org.apache.dolphinscheduler.common.datasource.mysql.MysqlDatasourceProcessor.getConnection(MysqlDatasourceProcessor.java:113)
        at 
org.apache.dolphinscheduler.common.datasource.DatasourceUtil.getConnection(DatasourceUtil.java:82)
        ... 12 common frames omitted
   ```
   
   **Which version of Dolphin Scheduler:**
   latest dev
   **Additional context**
   Add any other context about the problem here.
   
   **Requirement or improvement**
   - Please describe about your requirements or improvement suggestions.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to