cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Stream.AddStreamEntries produces null pointer exception

ague
12-Amethyst

Stream.AddStreamEntries produces null pointer exception

Hello, 

 

I have a stream that I am attempting to add entries to by calling the .AddStreamEntries() method. I have tried passing two different infotables - one whose datashape is identical to the datashape on the stream which I'm trying to edit, and one which is defined by a new datashape, where I added the fields for 'location', 'tags', etc (to match more exactly with all stream fields). 

 

Both methods throw a null pointer exception. I know that the infotable I'm passing it is not empty - already checked that.

 

Any ideas?

 

 

Things["MY_STREAM"].AddStreamEntries({
values: MY_INFO_TABLE /* INFOTABLE */
});

1 ACCEPTED SOLUTION

Accepted Solutions
ague
12-Amethyst
(To:ague)

If anyone is reading this and looking for an answer, here's the solution:

 

You must pass in a timestamp to the .AddStreamEntries() method (in addition to the values, of course). You do not need to pass in a 'source' nor 'sourceType'  - the service will still work. You actually don't even need to define a datashape for the infotable you pass in - you can just make an object directly. 

View solution in original post

2 REPLIES 2

Hard to say without more details on the Infotable contents you are adding and the Stream datashape. But for sure you need to fill standard parameters of stream: timestamp, sourceType and source.

ague
12-Amethyst
(To:ague)

If anyone is reading this and looking for an answer, here's the solution:

 

You must pass in a timestamp to the .AddStreamEntries() method (in addition to the values, of course). You do not need to pass in a 'source' nor 'sourceType'  - the service will still work. You actually don't even need to define a datashape for the infotable you pass in - you can just make an object directly. 

Top Tags