-
Notifications
You must be signed in to change notification settings - Fork 145
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
NullPointerException in Kafka Connect #350
Comments
The stacktrace seems not related to Jdbc driver |
Yes, it doesn't show anything about JDBC driver. However same exact setup with Postgres driver works fine, also same exact setup with official CH driver also works. Only difference between those is which JDBC driver is used. |
I have not tried just released 2.5.5 yet, since I cannot restart kafkaconnect just yet. I will try the same setup with 2.5.5 a little later and will provide feedback here. |
from my understand, the pipeline is |
we are changing the pipeline to use CH instead of PG. We have many topics to ingest into database (all different tables). Some work fine with this driver other have some problems. Now: New: We are running old and new setup in parallel, so the same data works with PG driver, but fails with CH native driver. |
Upgraded to 2.5.5. Stacktrace is different now:
|
that make sense, i see what happens in jdbc driver now. |
|
v2.5.6 is deployed. |
Thanks, I will test it once it is available in central. |
Update to 2.5.6, but still see same stacktrace:
|
I think the stacktrace indicate the column type is |
I needed to redact the names, but one of the tables where it fails looks like this:
Actual SQL used to create table is:
|
Hmm, I figured out that I flipped some values around and it works now, the data is being written into table. However this is very different from how official driver behaves, it still can handle above schema and not fail the task for some reason 🤔 Also would be helpful if there was a clearer error message for the cases like this. |
Yes, ClickHouse use |
Yes, while it is clearer now and I can ingest the data into clickhouse, one thing could be improved on this driver side is to have a better error handling for this case. The error here is very generic and does not point in the right direction. The point of having error messages at all is to make it clear what happened and possibly point to correct solution. I suggest to:
This will allow users to handle those issues in much cleaner way (and not bothering you with these issues regularly as it seems from issues history for this type of issue). |
Environment
21.5.5.12
2.5.5-shaded
6.1.1-2.12
Error logs
Steps to reproduce
The message contains types (as per CH types): String, UInt64, Float64, DateTime. Some columns can be NULL, as is defined in CH schema, but looks like there is some NPE happens inside the driver when kafka message field is actually
null
.Other descriptions
The same ingest works with official HTTP protocol driver, but would prefer to use this one as it works better in throughput and resource usage.
The text was updated successfully, but these errors were encountered: