libailin opened a new issue #1502:
URL: https://github.com/apache/incubator-seatunnel/issues/1502


   ### 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
   
   mysql to hdfs ,but jdbc source query not support `where ....` condition
   
   ### SeaTunnel Version
   
   a7ff0f8805a063a7c7a33f256f82f28235f8e1b1
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
   }
   
   source {
   
     JdbcSource {
        driver = "com.mysql.jdbc.Driver"
        url = 
"jdbc:mysql://10.202.254.10:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false"
        username = "root"
        password = "123456"
        query = "select username,admin from dc_user where admin=1"
        result_table_name = "user"
     }
   
   }
   
   transform {
   
   }
   sink {
     ConsoleSink {}
   }
   ```
   
   
   ### Running Command
   
   ```shell
   idea run LocalFlinkExample
   ```
   
   
   ### Error Exception
   
   ```log
   22/03/18 10:23:08 ERROR Seatunnel: Fatal Error, 
   
   22/03/18 10:23:08 ERROR Seatunnel: Please submit bug report in 
https://github.com/apache/incubator-seatunnel/issues
   
   22/03/18 10:23:08 ERROR Seatunnel: Reason:null 
   
   22/03/18 10:23:08 ERROR Seatunnel: Exception 
StackTrace:java.lang.NullPointerException
        at 
org.apache.flink.api.java.typeutils.TupleTypeInfoBase.<init>(TupleTypeInfoBase.java:64)
        at 
org.apache.flink.api.java.typeutils.RowTypeInfo.<init>(RowTypeInfo.java:89)
        at 
org.apache.seatunnel.flink.source.JdbcSource.getRowTypeInfo(JdbcSource.java:169)
        at 
org.apache.seatunnel.flink.source.JdbcSource.prepare(JdbcSource.java:129)
        at 
org.apache.seatunnel.flink.source.JdbcSource.prepare(JdbcSource.java:59)
        at 
org.apache.seatunnel.command.BaseTaskExecuteCommand.lambda$prepare$0(BaseTaskExecuteCommand.java:72)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at 
org.apache.seatunnel.command.BaseTaskExecuteCommand.prepare(BaseTaskExecuteCommand.java:72)
        at 
org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:49)
        at 
org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:35)
        at org.apache.seatunnel.Seatunnel.run(Seatunnel.java:48)
        at 
org.apache.seatunnel.example.flink.LocalFlinkExample.main(LocalFlinkExample.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:66)
    
   22/03/18 10:23:08 ERROR Seatunnel: 
   
===============================================================================
   
   
   
   Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:66)
   Caused by: java.lang.NullPointerException
        at 
org.apache.flink.api.java.typeutils.TupleTypeInfoBase.<init>(TupleTypeInfoBase.java:64)
        at 
org.apache.flink.api.java.typeutils.RowTypeInfo.<init>(RowTypeInfo.java:89)
        at 
org.apache.seatunnel.flink.source.JdbcSource.getRowTypeInfo(JdbcSource.java:169)
        at 
org.apache.seatunnel.flink.source.JdbcSource.prepare(JdbcSource.java:129)
        at 
org.apache.seatunnel.flink.source.JdbcSource.prepare(JdbcSource.java:59)
        at 
org.apache.seatunnel.command.BaseTaskExecuteCommand.lambda$prepare$0(BaseTaskExecuteCommand.java:72)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at 
org.apache.seatunnel.command.BaseTaskExecuteCommand.prepare(BaseTaskExecuteCommand.java:72)
        at 
org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:49)
        at 
org.apache.seatunnel.command.flink.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:35)
        at org.apache.seatunnel.Seatunnel.run(Seatunnel.java:48)
        at 
org.apache.seatunnel.example.flink.LocalFlinkExample.main(LocalFlinkExample.java:34)
        ... 5 more
   ```
   
   
   ### Flink or Spark Version
   
   flink 1.13.6
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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: [email protected]

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


Reply via email to