Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Java null pointer exception when deleting items from table #15

Open
wenyaowu opened this issue May 1, 2017 · 1 comment
Open

Java null pointer exception when deleting items from table #15

wenyaowu opened this issue May 1, 2017 · 1 comment

Comments

@wenyaowu
Copy link

wenyaowu commented May 1, 2017

I'm using source connector for my dynamo table.
There are no problems until I delete an item from the table, and this is what I got when I delete the item:
2017-05-01 14:12:28,609] ERROR Task dynamodb-source-test-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:141) java.lang.NullPointerException at dynamok.source.RecordMapper.toConnect(RecordMapper.java:57) at dynamok.source.DynamoDbSourceTask.toSourceRecord(DynamoDbSourceTask.java:120) at dynamok.source.DynamoDbSourceTask.lambda$poll$9(DynamoDbSourceTask.java:110) at dynamok.source.DynamoDbSourceTask$$Lambda$18/1910327716.apply(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at dynamok.source.DynamoDbSourceTask.poll(DynamoDbSourceTask.java:111) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

I'm wondering if the connector is trying to get attributes from NewImage but NewImage is null when deleting an item from the pointer so it keeps throwing NullPointer exception.

@anupkumarsharma
Copy link

anupkumarsharma commented Jul 2, 2018

Checkout this pull- #20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants