ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Getting an error when using the JDBC package with the InterBase database. #4262

Open kalaiyarasiganeshalingam opened 1 year ago

kalaiyarasiganeshalingam commented 1 year ago

Description: Getting the following error when trying to connect with the interbase database by using interclient.jar

[java.sql.SQLException: No suitable driver](error: Error in SQL connector configuration: Failed to get driver instance for jdbcUrl=jdbc:interbase://localhost:3050//opt/interbase/examples/employee.gdb Caused by :No suitable driver)

Run the following code by adding driver jar in the Ballerina.toml to reproduce this error:

import ballerinax/java.jdbc;

public function main() returns error? {
    jdbc:Client _ = check new (url ="jdbc:interbase://localhost:3050//opt/interbase/examples/employee.gdb", user ="SYSDBA", password = "masterkey"); 
}
kalaiyarasiganeshalingam commented 1 year ago

Tested the JDBC Connector with a free trial InterBase Server(InterBase Server Edition 2020). The following problems arose during this test. Fixed some issues with it.

Conclusion of this testing:

 java.lang.NoClassDefFoundError: sun/io/ByteToCharConverter