Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

NPE on record.setWithAck() #117

Open
mhball opened this issue Nov 14, 2017 · 3 comments
Open

NPE on record.setWithAck() #117

mhball opened this issue Nov 14, 2017 · 3 comments

Comments

@mhball
Copy link

mhball commented Nov 14, 2017

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.

@Arnovsky
Copy link

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

@mhball
Copy link
Author

mhball commented Jun 27, 2019

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

@afiller
Copy link

afiller commented Dec 10, 2020

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

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

3 participants