deepstream.io-client-java
deepstream.io-client-java copied to clipboard
NPE on record.setWithAck()
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 Hi, have you found any solution to this issue? Is there any branch of the library that fixes this?
@TripleSnipe Unfortunately we never found a solution and ended up moving away from Deepstream.io
@mhball / @Arnovsky I think I found a solution. Send me a message if it's still relevant for you.