Support Topics Documentation Slack YouTube Blog

can't add array of objects to data table

(Mitchell) #1

Hi Guys,

Getting an error when trying to add an array of objects to data table in production mode, note this works fine in debug mode.


List<NotificationToSend> notificationsArray = new ArrayList<NotificationToSend>();

Error message:

2018-06-26 11:56:55,618 | Coderunner | ERROR | Business logic execution has been stopped, due to error: Code: 0 Class: java.lang.NoSuchMethodError Message: com.backendless.IDataStore.create(Ljava/util/List;)V

Adding individual entries to the table works, but adding the array in one go does not.

(Mitchell) #2

This issue appears to be related to

(Vladimir Upirov) #3

Hi Mitchell

Unfortunately, I can’t reproduce it.
I’ve create/download a simple project template</img>

and add the next code

package com.sample.api;

import com.backendless.Backendless;
import com.backendless.servercode.IBackendlessService;

import java.util.ArrayList;
import java.util.List;

public class DemoService implements IBackendlessService
  public List&lt;String&gt; saveComment( )
    List&lt;DemoComment&gt; list = new ArrayList&lt;DemoComment&gt;();
    list.add(new DemoComment());
    list.add(new DemoComment());

    return Backendless.Data.of(DemoComment.class).create(list);

I check it in both modes Debug/Prod and it works well.

So, could you please create a minimal project and send it to and we will
try to reproduce your issue

Regards, Vlad