confluentinc / kafka-connect-jdbc

Kafka Connect connector for JDBC-compatible databases
Other
18 stars 955 forks source link

Issue connecting Kafka with JDBC driver of interbase #553

Open Bommu03 opened 5 years ago

Bommu03 commented 5 years ago

Hi Team, I am facing a problem in creating connector for interbase database using interclient.jar driver . I have placed the .jar file in right folder as per my docker configuration. The path to .jar file is

/etc/kafka-connect/jars".

I am using linux system.I have downloaded interclient from the link https://www.dbschema.com/interbase-jdbc-driver.html.

The POST command for connector configuration is as curl -X POST -H "Content-Type: application/json" --data "{ \"name\": \"ib_connector\",\"config\": { \"connector.class\": \"io.confluent.connect.jdbc.JdbcSourceConnector\", \"tasks.max\": 1,\"connection.url\": \"jdbc:interbase://remoteip:3050/TEST2.gdb?user=SYSDBA&password=masterkey\",\"mode\": \"timestamp+incrementing\", \"incrementing.column.name\": \"id\",\"timestamp.column.name\": \"modified\", \"topic.prefix\": \"test-interbase-\", \"poll.interval.ms\": 1000 } }" http://localhost:8083/connectors.

The error message i am getting is as follows.

{"error_code":400,"message":"Connector configuration is invalid and contains the following 2 error(s):\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:interbase://remoteip:3050/TEST2?user=SYSDBA&password=masterkey for configuration Couldn't open connection to jdbc:interbase://remoteip:3050/TEST2?user=SYSDBA&password=masterkey\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:interbase://remoteip:3050/TEST2?user=SYSDBA&password=masterkey.

The docker-compose file is configured as

`version: '3.7' services: zookeeper: image: confluentinc/cp-zookeeper:${CONFLUENT_VERSION} networks:

networks: kafka: driver: bridge ` What could be the issue in this. Please help.

OneCricketeer commented 5 years ago

As mentioned on Stackoverflow, this will be difficult to test and verify as working without the ability to freely install interbase itself...

At the very least, I was able put the JAR next to all my others, and used jdbc:interbase://..., and was expecting a network exception, for example, but no... When I switch back to another URL for another driver, I do get its driver found and timeout exceptions since I don't have its database running, so I know the Connector path is correct.

Personally, I would suggest debugging the problem outside of Docker first to reduce the issue space