DataX drdswriter 出现No operations allowed after statement closed

eoxn13cs  于 2022-10-20  发布在  其他
关注(0)|答案(2)|浏览(399)

通过datax 往drds迁移数据的时候,执行出现No operations allowed after statement closed错误
java.sql.SQLException: [109702d57bd78000][10.0.59.228:3306][coldchain]No operations allowed after statement closed.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1242) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Task.doOneInsert(CommonRdbmsWriter.java:383) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na
]
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Task.doBatchInsert(CommonRdbmsWriter.java:363) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:
na]
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Task.startWriteWithConnection(CommonRdbmsWriter.java:291) [plugin-rdbms-util-0.0.1-SN
APSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Task.startWrite(CommonRdbmsWriter.java:319) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.writer.drdswriter.DrdsWriter$Task.startWrite(DrdsWriter.java:82) [drdswriter-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:56) [datax-core-0.0.1-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

然后一直提示如下信息:

2020-05-08 11:15:51.400 [0-0-96-writer] WARN CommonRdbmsWriter$Task - 回滚此次写入, 采用每次写入一行方式提交. 因为:[109702d802d78000-2][xxx.xxx.xxx.xxx:330
6][tableName]No operations allowed after statement closed.
2020-05-08 11:15:51.671 [0-0-96-writer] WARN CommonRdbmsWriter$Task - 回滚此次写入, 采用每次写入一行方式提交. 因为:[109702d846978000-2][xxx.xxx.xxx.xxx:330
6][tableName]No operations allowed after statement closed.
2020-05-08 11:15:51.942 [0-0-96-writer] WARN CommonRdbmsWriter$Task - 回滚此次写入, 采用每次写入一行方式提交. 因为:[109702d88a978000-2][xxx.xxx.xxx.xxx:330
6][tableName]No operations allowed after statement closed.

经过我添加日志发现connection 和 preparedStatement的isClosed状态都为false,我也在抛异常的地方添加了preparedStatement.exeucte("select 1") ,没有抛出类似异常

busg9geu

busg9geu1#

我用datax库对导的时候也报这个了

b4lqfgs4

b4lqfgs42#

我用drds的preSql配置项时也报这个错误了,请问好兄弟解决了吗

相关问题