Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid JDBC URL when the URL contains '@' sign #2318

Closed
Abshan opened this issue Dec 11, 2023 · 0 comments · Fixed by siddhi-io/siddhi-io-cdc#86
Closed

Invalid JDBC URL when the URL contains '@' sign #2318

Abshan opened this issue Dec 11, 2023 · 0 comments · Fixed by siddhi-io/siddhi-io-cdc#86

Comments

@Abshan
Copy link

Abshan commented Dec 11, 2023

Problem

Hi All,

@source(type='cdc', 
    url='jdbc:oracle:thin:@localhost:1521/SAMPLEDB',  
    username='admin', 
    password='admin',     
    table.name='inventory.products', 
    operation='insert', 
    database.server.name='PRODINS', 
connector.properties="database.out.server.name=sample,snapshot.mode=initial_schema_only",
    @map(type = 'keyvalue', fail.on.missing.attribute='false'))
define stream ProductInsertInputStream (
    ID int, NAME string, DESCRIPTION string, QUANTITY int);

When we define the Oracle JDBC url format as shown in the sample above, the below mentioned error message get prompted in the SI-Tooling Editor window.

Error!Error while parsing Errors in Siddhi app.The cdc source couldn't get started because of invalid configurations. Found configurations: {username='admin', password=admin, url='jdbc:oracle:thin:@localhost:1521/sample_db', tablename='ABC', connetorProperties='database.out.server.name=sample,snapshot.mode=initial_schema_only'}

The above error is being thrown from the validator service, The validation failure appears to be caused by the format of the URL specified for the CDC source. Upon investigation, we found that the '@' character in the JDBC URL (jdbc:oracle:thin:@localhost:1521/SAMPLEDB) is the source of the validation failure. While the provided JDBC URL is valid [1], SI shows that the provided URL is invalid.

Hence, this needs to be fixed for both SI and SI-Tooling.

[1] https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/index.html

Thanks,
Abshan

Solution

Change the validation regex to support '@' character in Oracle JDBC URL.

Affected Component

SI

Version

4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants