deepstream.io-client-java icon indicating copy to clipboard operation
deepstream.io-client-java copied to clipboard

NPE on record.setWithAck()

Open mhball opened this issue 8 years ago • 3 comments

I'm getting a null pointer when using record.setWithAck()

Using the following code snippets:

this.client = new DeepstreamClient(dsUrl);

Record record = client.record.getRecord(dataPacket.getSchemaKey() + "/" +metaData.getInstanceUrn());
record.setWithAck(gson.toJsonTree(toStore));

The record is being set; however I get the following exception:

Exception in thread "pool-13-thread-1" java.lang.NullPointerException
	at io.deepstream.UtilSingleNotifier.recieve(UtilSingleNotifier.java:133)
	at io.deepstream.RecordHandler.handle(RecordHandler.java:497)
	at io.deepstream.Connection$4.run(Connection.java:230)
	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)

This exception isn't thrown if I switch it to record.set(gson.toJsonTree(toStore)); instead.

mhball avatar Nov 14 '17 22:11 mhball

@mhball Hi, have you found any solution to this issue? Is there any branch of the library that fixes this?

Arnovsky avatar Jun 25 '19 10:06 Arnovsky

@TripleSnipe Unfortunately we never found a solution and ended up moving away from Deepstream.io

mhball avatar Jun 27 '19 01:06 mhball

@mhball / @Arnovsky I think I found a solution. Send me a message if it's still relevant for you.

afiller avatar Dec 10 '20 13:12 afiller