You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/05/19 09:07:29 UTC
[GitHub] [incubator-seatunnel] misslujiaqi opened a new issue, #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
misslujiaqi opened a new issue, #1920:
URL: https://github.com/apache/incubator-seatunnel/issues/1920
### 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
JdbcSource method throws NullPointerException when I run seatunnel .
Is this a bug? or I run with an error config.
Can I connect Clickhouse as the source through JDBC?
### SeaTunnel Version
seatunnel-2.1.1
### SeaTunnel Config
```conf
env {
execution.parallelism = 1
}
source {
JdbcSource {
driver = "com.clickhouse.jdbc.ClickHouseDriver"
url = "jdbc:clickhouse://hadoop102:8123/"
database = "default"
username = "default"
password = "test"
query = "select id from test1"
}
}
transform {}
sink {
ConsoleSink {}
}
```
### Running Command
```shell
./bin/start-seatunnel-flink.sh -p 2 --config config/jobs/test3.config
```
### Error Exception
```log
2022-05-19 10:51:11,172 ERROR org.apache.flink.client.cli.CliFrontend [] - Error while running th
e command.
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Execute Flink task error
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372) ~[flink-dist_2.12-
1.13.6.jar:1.13.6]
at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
~[flink-dist_2.12-1.13.6.jar:1.13.6]
at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) ~[flink-dist_2.12-1.13.6.jar:1.13.
6]
at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812) ~[flink-dist_2.12-1.13.6.jar:1
.13.6]
at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246) ~[flink-dist_2.12-1.13.6.jar:1.13.6]
at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054) ~[flink-dist_2.12-1.13.6.jar:1.1
3.6]
at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132) ~[flink-dist_2.12-1.13.6.jar:
1.13.6]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_333]
at javax.security.auth.Subject.doAs(Subject.java:422) [?:1.8.0_333]
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1754) [flink-shaded-hadoop-2
-uber-2.7.5-10.0.jar:2.7.5-10.0]
at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
[flink-dist_2.12-1.13.6.jar:1.13.6]
at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132) [flink-dist_2.12-1.13.6.jar:1.13.6]
Caused by: java.lang.RuntimeException: Execute Flink task error
at org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:63) ~[?:?]
at org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:39) ~[?:?]
at org.apache.seatunnel.Seatunnel.run(Seatunnel.java:48) ~[?:?]
at org.apache.seatunnel.SeatunnelFlink.main(SeatunnelFlink.java:27) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_333]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_333]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_333]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_333]
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355) ~[flink-dist_2.12-
1.13.6.jar:1.13.6]
... 11 more
Caused by: java.lang.NullPointerException
at org.apache.flink.api.java.typeutils.TupleTypeInfoBase.<init>(TupleTypeInfoBase.java:64) ~[flink-dist_2.12-1
.13.6.jar:1.13.6]
at org.apache.flink.api.java.typeutils.RowTypeInfo.<init>(RowTypeInfo.java:89) ~[flink-dist_2.12-1.13.6.jar:1.
13.6]
at org.apache.seatunnel.flink.jdbc.source.JdbcSource.getRowTypeInfo(JdbcSource.java:273) ~[?:?]
at org.apache.seatunnel.flink.jdbc.source.JdbcSource.prepare(JdbcSource.java:144) ~[?:?]
at org.apache.seatunnel.flink.jdbc.source.JdbcSource.prepare(JdbcSource.java:70) ~[?:?]
at org.apache.seatunnel.command.BaseTaskExecuteCommand.lambda$prepare$0(BaseTaskExecuteCommand.java:71) ~[?:?]
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_333]
at org.apache.seatunnel.command.BaseTaskExecuteCommand.prepare(BaseTaskExecuteCommand.java:71) ~[?:?]
at org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:59) ~[?:?]
at org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:39) ~[?:?]
at org.apache.seatunnel.Seatunnel.run(Seatunnel.java:48) ~[?:?]
at org.apache.seatunnel.SeatunnelFlink.main(SeatunnelFlink.java:27) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_333]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_333]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_333]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_333]
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355) ~[flink-dist_2.12-
1.13.6.jar:1.13.6]
... 11 more
```
### Flink or Spark Version
flink-1.13.6
### Java or Scala Version
Java 1.8
### 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] misslujiaqi commented on issue #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
Posted by GitBox <gi...@apache.org>.
misslujiaqi commented on issue #1920:
URL: https://github.com/apache/incubator-seatunnel/issues/1920#issuecomment-1131678915
> now jdbc support mysql postgresql oracle, others has not do type inform mapping. your bug look like it has no type mapping.so gerenal RowTypeInfo error.
Thank you for your reply.
Can I connect Clickhouse directly from source? At present, there is no case of Clickhouse on the official website.
--
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] tobezhou33 commented on issue #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
Posted by GitBox <gi...@apache.org>.
tobezhou33 commented on issue #1920:
URL: https://github.com/apache/incubator-seatunnel/issues/1920#issuecomment-1131654170
now jdbc support mysql postgresql oracle, others has not do type inform mapping.
your bug look like it has no type mapping.so gerenal RowTypeInfo error.
--
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] misslujiaqi commented on issue #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
Posted by GitBox <gi...@apache.org>.
misslujiaqi commented on issue #1920:
URL: https://github.com/apache/incubator-seatunnel/issues/1920#issuecomment-1131672002
Can I connect Clickhouse directly from source? At present, there is no case of Clickhouse on the official website
--
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] misslujiaqi closed issue #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
Posted by GitBox <gi...@apache.org>.
misslujiaqi closed issue #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
URL: https://github.com/apache/incubator-seatunnel/issues/1920
--
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] misslujiaqi closed issue #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
Posted by GitBox <gi...@apache.org>.
misslujiaqi closed issue #1920: [Bug][help wanted][Source][JdbcSource][clickhouse]Flink JdbcSource(clickhouse) getRowTypeInfo() throws NullPointerException
URL: https://github.com/apache/incubator-seatunnel/issues/1920
--
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