You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "sangeetha1706 (via GitHub)" <gi...@apache.org> on 2023/03/13 09:48:07 UTC
[GitHub] [incubator-seatunnel] sangeetha1706 opened a new issue, #4343: I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
sangeetha1706 opened a new issue, #4343:
URL: https://github.com/apache/incubator-seatunnel/issues/4343
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
### SeaTunnel Version
apache-seatunnel-incubating-2.3.0
### SeaTunnel Config
```conf
env {
job.mode = "BATCH"
}
source {
jdbc{
url ="jdbc:mysql://10.0.0.82:3306/test?serverTimezone=GMT%2b8"
driver = "com.mysql.jdbc.Driver"
user = "hauser"
password = "Hauser@7ujm"
query = "SELECT ID,NAME FROM SOURCE_USER;"
}
}
transform {
}
sink {
jdbc{
#table_name = "SINK_USER"
url = "jdbc:mysql://10.0.0.82:3306/test?serverTimezone=GMT%2b8"
driver = "com.mysql.jdbc.Driver"
user = "hauser"
password = "Hauser@7ujm"
query = "insert into SINK_USER SELECT * FROM SOURCE_USER"
}
}
```
### Running Command
```shell
./bin/seatunnel.sh -c ./config/mysql-mysql.conf -e LOCAL
```
### Error Exception
```log
ERROR org.apache.seatunnel.connectors.seatunnel.jdbc.internal.JdbcOutputFormat - JDBC executeBatch error, retry times = 1
java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) ~[mysql-connector-java-5.1.17.jar:?]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) ~[mysql-connector-java-5.1.17.jar:?]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) ~[mysql-connector-java-5.1.17.jar:?]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) ~[mysql-connector-java-5.1.17.jar:?]
at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3717) ~[mysql-connector-java-5.1.17.jar:?]
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3701) ~[mysql-connector-java-5.1.17.jar:?]
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3743) ~[mysql-connector-java-5.1.17.jar:?]
at com.mysql.jdbc.PreparedStatement.setInt(PreparedStatement.java:3687) ~[mysql-connector-java-5.1.17.jar:?]
at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.converter.AbstractJdbcRowConverter.toExternal(AbstractJdbcRowConverter.java:136) ~[connector-jdbc-2.3.0.jar:2.3.0]
at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.executor.SimpleBatchStatementExecutor.addToBatch(SimpleBatchStatementExecutor.java:48) ~[connector-jdbc-2.3.0.jar:2.3.0]
at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.executor.SimpleBatchStatementExecutor.addToBatch(SimpleBatchStatementExecutor.java:31) ~[connector-jdbc-2.3.0.jar:2.3.0]
at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.executor.BufferedBatchStatementExecutor.executeBatch(BufferedBatchStatementExecutor.java:54) ~[connector-jdbc-2.3.0.jar:2.3.0]
at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.JdbcOutputFormat.attemptFlush(JdbcOutputFormat.java:191) ~[connector-jdbc-2.3.0.jar:2.3.0]
at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.JdbcOutputFormat.flush(JdbcOutputFormat.java:160) ~[connector-jdbc-2.3.0.jar:2.3.0]
at org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSinkWriter.prepareCommit(JdbcSinkWriter.java:85) ~[connector-jdbc-2.3.0.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:136) ~[seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:57) ~[seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:39) ~[seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:27) ~[seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.flow.IntermediateQueueFlowLifeCycle.handleRecord(IntermediateQueueFlowLifeCycle.java:72) [seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.flow.IntermediateQueueFlowLifeCycle.collect(IntermediateQueueFlowLifeCycle.java:58) [seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.collect(TransformSeaTunnelTask.java:65) [seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.SeaTunnelTask.stateProcess(SeaTunnelTask.java:157) [seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.call(TransformSeaTunnelTask.java:71) [seatunnel-starter.jar:2.3.0]
at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:357) [seatunnel-starter.jar:2.3.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_161]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
```
### Flink or Spark Version
_No response_
### Java or Scala Version
_No response_
### Screenshots
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] github-actions[bot] commented on issue #4343: I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4343:
URL: https://github.com/apache/incubator-seatunnel/issues/4343#issuecomment-1515543349
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] lightzhao commented on issue #4343: I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
Posted by "lightzhao (via GitHub)" <gi...@apache.org>.
lightzhao commented on issue #4343:
URL: https://github.com/apache/incubator-seatunnel/issues/4343#issuecomment-1465846278
Check whether the schema of source and sink are consistent.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] laglangyue commented on issue #4343: I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
Posted by "laglangyue (via GitHub)" <gi...@apache.org>.
laglangyue commented on issue #4343:
URL: https://github.com/apache/incubator-seatunnel/issues/4343#issuecomment-1466436889
your conf is error, we use your sql to insert,and the character '?' is source field data like jdbc,please use the next conf

--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] github-actions[bot] closed issue #4343: I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #4343: I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
URL: https://github.com/apache/incubator-seatunnel/issues/4343
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] github-actions[bot] commented on issue #4343: I want to synchronise data from one mysql table to another mysql table but Im facing this issue " java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)."
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4343:
URL: https://github.com/apache/incubator-seatunnel/issues/4343#issuecomment-1506133407
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org