You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2021-12-21 23:45:17,827] ERROR WorkerSinkTask{id=clickhousesink-test3-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted. (org.apache.kafka.connect.runtime.WorkerSinkTask)
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at com.github.housepower.buffer.ByteArrayWriter.lambda$reset$0(ByteArrayWriter.java:79)
at java.lang.Iterable.forEach(Iterable.java:75)
at com.github.housepower.buffer.ByteArrayWriter.reset(ByteArrayWriter.java:78)
at com.github.housepower.data.ColumnWriterBuffer.reset(ColumnWriterBuffer.java:56)
at com.github.housepower.data.ColumnWriterBufferFactory.getBuffer(ColumnWriterBufferFactory.java:52)
at com.github.housepower.data.Block.initWriteBuffer(Block.java:157)
at com.github.housepower.jdbc.statement.ClickHousePreparedInsertStatement.lambda$initBlockIfPossible$0(ClickHousePreparedInsertStatement.java:209)
at com.github.housepower.misc.ExceptionUtil.rethrowSQLException(ExceptionUtil.java:64)
at com.github.housepower.jdbc.statement.ClickHousePreparedInsertStatement.initBlockIfPossible(ClickHousePreparedInsertStatement.java:207)
at com.github.housepower.jdbc.statement.ClickHousePreparedInsertStatement.<init>(ClickHousePreparedInsertStatement.java:111)
at com.github.housepower.jdbc.ClickHouseConnection.prepareStatement(ClickHouseConnection.java:158)
......(omit business code)
at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:642)
at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:394)
at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:265)
at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:230)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:223)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:269)
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)
Steps to reproduce
I use Clickhouse JDBC as a kafka connect sink plugin to send messages from a kafka to a Clickhouse cluster.
When I compiled the code in JDK11, Clickhouse 2.6.3 to get a jar file, and ran it with SDK1.8, the error happened.
When I switched to use Clickhouse 2.5.7 version, the code worked properly.
Other descriptions
I think it is because the version of JDK 1.8+ not competitable with JDK1.8.
So it leads to error when use the function in com/github/housepower/buffer/ByteArrayWriter.java at line 77 in version 2.6:
public void reset() {
byteBufferList.forEach(b -> {
b.clear(); # <----- here
freeList.addLast(b);
});
byteBufferList.clear();
reuseOrAllocateByteBuffer();
}
The exception looks like the same as the stackOverflow bug below. I think it is better to use a cast function to prevent the incompatible condition. StackOverflow link
The text was updated successfully, but these errors were encountered:
Environment
You can find the JDK 1.8 ,JDK 1.11. And I think the exception can reproduce in any other JDK corporation version.
Error logs
Steps to reproduce
I use Clickhouse JDBC as a kafka connect sink plugin to send messages from a kafka to a Clickhouse cluster.
When I compiled the code in JDK11, Clickhouse 2.6.3 to get a jar file, and ran it with SDK1.8, the error happened.
When I switched to use Clickhouse 2.5.7 version, the code worked properly.
Other descriptions
I think it is because the version of JDK 1.8+ not competitable with JDK1.8.
So it leads to error when use the function in
com/github/housepower/buffer/ByteArrayWriter.java
at line 77 in version 2.6:The exception looks like the same as the stackOverflow bug below. I think it is better to use a
cast
function to prevent the incompatible condition.StackOverflow link
The text was updated successfully, but these errors were encountered: