question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reimplement `jdbc` rule via composition pattern

See original GitHub issue

The JDBC tracer replaces the connection with a tracing connection with built in tracing stuff, like a wrapper around the entire database connection.

connect_1 | java.lang.ClassCastException: io.opentracing.contrib.jdbc.TracingConnection cannot be cast to org.postgresql.core.BaseConnection kafka-connect_1
 at io.debezium.connector.postgresql.TypeRegistry.prime(TypeRegistry.java:312) kafka-connect_1
 at io.debezium.connector.postgresql.TypeRegistry.<init>(TypeRegistry.java:122) kafka-connect_1
 at io.debezium.connector.postgresql.connection.PostgresConnection.<init>(PostgresConnection.java:72) kafka-connect_1
 at io.debezium.connector.postgresql.PostgresConnector.validate(PostgresConnector.java:102) kafka-connect_1
 at >org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:282) kafka-connect_1

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
safriscommented, Jan 25, 2020

Reopening due to issue with Debezium:

 java.lang.ClassCastException: com.sun.proxy.$Proxy51 cannot be cast to org.postgresql.jdbc.PgConnection
     at io.debezium.connector.postgresql.connection.PostgresConnection.determineDatabaseCharset(PostgresConnection.java:403)
     at io.debezium.connector.postgresql.connection.PostgresConnection.<init>(PostgresConnection.java:73)
     at io.debezium.connector.postgresql.PostgresConnector.validate(PostgresConnector.java:102)
     at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:282)
     at org.apache.kafka.connect.runtime.distributed.DistributedHerder$6.call(DistributedHerder.java:537)
     at org.apache.kafka.connect.runtime.distributed.DistributedHerder$6.call(DistributedHerder.java:534)
     at org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:270)
     at org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:219)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
     at java.lang.Thread.run(Thread.java:748)
0reactions
randalltcommented, Feb 5, 2020

Sorry, my comment was confusing. Disregard. I was using a previous version of the agent before the WrapperProxy was used. Testing with version 1.5.7 fixes the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JDBC Multitable Consumer - Portal - StreamSets Docs
The JDBC Multitable Consumer origin reads database data from multiple tables and multiple schemas through a JDBC connection. For information about supported ...
Read more >
Spring Data JDBC - Reference Documentation
Spring Data repositories are implemented by using fragments that form a repository composition. Fragments are the base repository, ...
Read more >
6.2 Connection URL Syntax
jdbc :mysql+srv:replication: is for replication JDBC connections that make use of DNS SRV records. mysqlx+srv: is for X DevAPI connections that make use...
Read more >
The Visitor Pattern Re-visited – Java, SQL and jOOQ.
It's simple: Stick with the composite pattern! It allows you to add some API elements to your data structure, that everyone has to...
Read more >
Pattern: Saga - Microservice Architecture
If a local transaction fails because it violates a business rule then the saga ... to use the Saga, API Composition, and CQRS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found