Zzih opened a new issue, #9350:
URL: https://github.com/apache/seatunnel/issues/9350

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
    the port is optional in a JDBC URL. However, the current validation logic 
in JdbcUrlUtil treats the port as mandatory. It should be updated to support 
JDBC URLs that do not explicitly specify a port.
   
   <img width="1207" alt="Image" 
src="https://github.com/user-attachments/assets/5854f27b-2631-4936-aafb-a21d2824d1e2";
 />
   
   ### SeaTunnel Version
   
   2.3.10
   
   ### SeaTunnel Config
   
   ```conf
   env {
       job.mode=BATCH
       parallelism=1
   }
   source {
       jdbc {
           driver="com.mysql.cj.jdbc.Driver"
           password="tmp"
           query="select 1"
           
url="jdbc:mysql://tmp.rds.amazonaws.com/tmp?zeroDateTimeBehavior=convertToNull"
           user="tmp"
       }
   }
   sink {
       OssFile {
           access_key="tmp"
           access_secret="tmp"
           bucket="oss://tmp"
           data_save_mode="DROP_DATA"
           endpoint="tmp"
           file_format_type=parquet
           is_enable_transaction=true
           path="/ods/tmp/"
           schema_save_mode="CREATE_SCHEMA_WHEN_NOT_EXIST"
       }
   }
   ```
   
   ### Running Command
   
   ```shell
   No response
   ```
   
   ### Error Exception
   
   ```log
   Caused by: java.lang.IllegalArgumentException: The jdbc url format is 
incorrect: 
jdbc:mysql://tmp.rds.amazonaws.com/tmp?zeroDateTimeBehavior=convertToNull
   ```
   
   ### Zeta or 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: [email protected]

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

Reply via email to