Skip to content

Instantly share code, notes, and snippets.

@ivanursul
Created October 24, 2017 13:21
Show Gist options
  • Save ivanursul/088b794c3424e6838fd91605419ab6ec to your computer and use it in GitHub Desktop.
Save ivanursul/088b794c3424e6838fd91605419ab6ec to your computer and use it in GitHub Desktop.
org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: column "device_id" is of type bigint but expression is of type timestamp without time zone
Hint: You will need to rewrite or cast the expression.
Where: PL/pgSQL function "$justone$kafka$connect$sink".flush(character varying,character varying,character varying[],integer[],bigint[]) line 10 at EXECUTE
at com.justone.kafka.sink.pg.json.PostgreSQLSinkTask.flush(PostgreSQLSinkTask.java:402)
at org.apache.kafka.connect.sink.SinkTask.preCommit(SinkTask.java:117)
at org.apache.kafka.connect.runtime.WorkerSinkTask.commitOffsets(WorkerSinkTask.java:305)
at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:164)
at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:148)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:146)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:190)
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)
Caused by: org.postgresql.util.PSQLException: ERROR: column "device_id" is of type bigint but expression is of type timestamp without time zone
Hint: You will need to rewrite or cast the expression.
Where: PL/pgSQL function "$justone$kafka$connect$sink".flush(character varying,character varying,character varying[],integer[],bigint[]) line 10 at EXECUTE
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
at com.justone.kafka.sink.pg.json.PostgreSQLSinkTask.flush(PostgreSQLSinkTask.java:397)
... 11 more
[2017-10-24 17:20:30,232] ERROR Commit of WorkerSinkTask{id=justone-kafka-sink-pg-json-0} offsets threw an unexpected exception: (org.apache.kafka.connect.runtime.WorkerSinkTask:205)
org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: column "device_id" is of type bigint but expression is of type timestamp without time zone
Hint: You will need to rewrite or cast the expression.
Where: PL/pgSQL function "$justone$kafka$connect$sink".flush(character varying,character varying,character varying[],integer[],bigint[]) line 10 at EXECUTE
at com.justone.kafka.sink.pg.json.PostgreSQLSinkTask.flush(PostgreSQLSinkTask.java:402)
at org.apache.kafka.connect.sink.SinkTask.preCommit(SinkTask.java:117)
at org.apache.kafka.connect.runtime.WorkerSinkTask.commitOffsets(WorkerSinkTask.java:305)
at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:164)
at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:148)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:146)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:190)
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)
Caused by: org.postgresql.util.PSQLException: ERROR: column "device_id" is of type bigint but expression is of type timestamp without time zone
Hint: You will need to rewrite or cast the expression.
Where: PL/pgSQL function "$justone$kafka$connect$sink".flush(character varying,character varying,character varying[],integer[],bigint[]) line 10 at EXECUTE
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
at com.justone.kafka.sink.pg.json.PostgreSQLSinkTask.flush(PostgreSQLSinkTask.java:397)
... 11 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment