使用Datax进行数据迁移行报错,经DataX智能分析,该任务最可能的错误原因是:
com.alibaba.datax.common.exception.DataXException: Code:[Framework-02], Description:[DataX引擎运行过程出错,具体原因请参看DataX运行结束时的错误诊断信息 .]. - java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to java.lang.String
请问是什么原因
我的mysql.json 配置如下
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"sliceRecordCount": 10,
"column": [
"*"
],
"connection": [
{
"jdbcUrl": [
"jdbc:mysql://10.xxx.xx.xxx:3306/xxxxx"
],
"table": [
"auth_user_user_permissions"
]
}
],
"password": "xxxxx",
"username": "xxxx"
}
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"encoding": "UTF-8",
"column": [
{
"name": "id",
"type": "INT"
},
{
"name": "user_id",
"type": "INT"
},
{
"name": "permission_id",
"type": "INT"
}
],
"connection": [
{
"jdbcUrl": "jdbc:mysql://10.xxx.xx.xxxx:3306/xxxx",
"table": [
"test"
]
}
],
"password": "xxxxx",
"username": "xxxx"
}
}
}
],
"setting": {
"speed": {
"channel": 5
}
}
}
}
writer的jdbcUrl
写的有问题,改成和reader的数组写法
参考地址:https://github.com/alibaba/DataX/issues/133
"connection": [
{
"jdbcUrl":[
"jdbc:mysql://10.xxx.xx.xxxx:3306/xxxx"] ,
"table": [
"test"
]
}
],
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。