Backendless Support
 
Solved

error with code 1000 appears while saving new row

FAULT = '1000' [Entity with the specified ID cannot be found: Id - missing id] <Entity with the specified ID cannot be found: Id - missing id>

why i am receiving this error ?

Leave a Comment

Comments (19)

photo
1

Hi Zwwshan,

Could you please post here code you execute?

Regards, Artur.

photo
1

location.longitude = mapView.userLocation.coordinate.longitude;

location.latitude = mapView.userLocation.coordinate.latitude;

location.user = backendless.userService.currentUser;

location.isUserLogIn = 1;

[location saveLocation:^(Fault *error)

{

if (error) {

NSLog(@"Location updation failed with error %@", error);

}

}];

//////

Locations class save method :

-(void)saveLocation:(void (^)(Fault *))error

{

[[backendless.persistenceService of:[Locations class]] save:self response:^(id response)

{

error(nil);

}error:^(Fault *err)

{

error(err);

}];

}

photo
photo
1

location.longitude = mapView.userLocation.coordinate.longitude;

location.latitude = mapView.userLocation.coordinate.latitude;

location.user = backendless.userService.currentUser;

location.isUserLogIn = 1;

[location saveLocation:^(Fault *error)

{

if (error) {

NSLog(@"Location updation failed with error %@", error);

}

}];

//////

Locations class save method :

-(void)saveLocation:(void (^)(Fault *))error

{

[[backendless.persistenceService of:[Locations class]] save:self response:^(id response)

{

error(nil);

}error:^(Fault *err)

{

error(err);

}];

}

photo
1

Same problem, yesterday it works like a charm:

LogCat: D/Solicitud: Rechazada Error:BackendlessFault{ code: '1000', message: 'Entity with the specified ID cannot be found: Id - missing id' }

  1. Backendless.Persistence.of(BackendlessUser.class).findById(user.getObjectId(), new AsyncCallback<BackendlessUser>() {

    @Override

    public void handleResponse(BackendlessUser user) {

    final String emailUser = user.getEmail();

    final String nombreUser = (String) user.getProperty("name");

    final String clienteId = (String) user.getObjectId();

    String whereClause = "status = '1' AND nombreUsuario =' " + emailUser + "'";

    BackendlessDataQuery dataQuery = new BackendlessDataQuery();

    dataQuery.setWhereClause(whereClause);

    Backendless.Persistence.of(Solicitud.class).find(dataQuery, new

    AsyncCallback<BackendlessCollection<Solicitud>>() {

    @Override

    public void handleResponse(BackendlessCollection<Solicitud> solicitudBackendlessCollection) {

    Log.d("objetos recibidos ", "" + solicitudBackendlessCollection.getTotalObjects());

    if (solicitudBackendlessCollection.getTotalObjects() == 0) {

    Log.d("Response Solicitud", "" + solicitudBackendlessCollection.getTotalObjects());

    String deviceId = Build.SERIAL;

    Solicitud sol = new Solicitud();

    sol.setNombreUsuario(emailUser);

    sol.setNombre(nombreUser);

    sol.setDeviceId(deviceId);

    sol.setPuntoReferencia("" + referencia);

    sol.setDireccion("" + direccion);

    sol.setClienteId(clienteId);

    geoPoint.setLatitude(latitude);

    geoPoint.setLongitude(longitude);

    sol.setStatus("1");

    sol.setUbicacion(geoPoint);

    Log.d("sol status ", sol.getStatus());

    Log.d("sol punto ", sol.getPuntoReferencia());

    Backendless.Persistence.save(sol, new AsyncCallback<Solicitud>() {

    public void handleResponse(Solicitud response) {

    Log.d("Enviar Solicitud", "Solicitud Aceptadaaaaaaaaa");

    lanzarUserEsperandoActivity(response.getObjectId());

    progressDialog.cancel();

    }

    public void handleFault(BackendlessFault fault) {

    Log.d("Enviar Solicitud", "Rechazada Error:"+fault.toString());

    progressDialog.cancel();

    }

    });

    } else {

    for (Solicitud sol : solicitudBackendlessCollection.getData())

    Log.d("Response Solicitud", "" + sol.getNombreUsuario() + " " + sol.getUbicacion());

    }

    }

    @Override

    public void handleFault(BackendlessFault backendlessFault) {

    Log.d("Response Solicitud", "Error" + backendlessFault.toString());

    }

    }

    );

photo
2

Yeah everything was going good... same error is now occurring in the old backup code as well.

photo
2

It's like a problem in the server or something like that...

photo
3

Yes i think it is server side error

photo
2

If you use iOS, please update the following two libraries from github (click on "View Raw" to download) and it will work:

https://github.com/Backendless/ios-SDK/blob/master/SDK/lib/backendless/backendless.a

https://github.com/Backendless/ios-SDK/blob/master/SDK/lib/CommLibiOS/CommLibiOS.a

photo
1

Hi Mark, and the Android Users?

Thank you very much!

photo
1

Everything works fine with the SDK on our website. The latest build is always in github:

https://github.com/Backendless/Android-SDK/tree/master/out

photo
1

Thanks Mark, it's working now.

photo
1

Hi Mark, I updated the libraries you mentioned above and it worked and now after some time the same error is occurring again.

FAULT = '1000' [Entity with the specified ID cannot be found: Id - 34EB5CB0-D8FB-0463-FFCD-696236FACD00] <Entity with the specified ID cannot be found: Id - 34EB5CB0-D8FB-0463-FFCD-696236FACD00>

photo
1

Zeeshan,

Does the error occur when you save a new object or update an existing one?

Mark

photo
1

Hi ,

I am facing same issue in android when save new record.Previously it works fine but now it will show me the same error as above.

photo
1

Hi angel!

This error reproduces right now?

Could you provide example of your code and android sdk version?

Regards,

Kate.

photo
1

Hi Kate,

Right now this error is not reproduce it works fine. Actually i am saving object from realm database to backendless and in setObjectId() method i will pass setObjectId("") so it will generate that error bt now i am passing setObjectId(null) so it work fine.

Thanks

photo
photo
1

I'm getting the same error;

  1. p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}

    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; min-height: 13.0px}

    p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3495af}

    p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #0433ff}

    p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b4261a}

    p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008f00}

    p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008000}

    span.s1 {font-variant-ligatures: no-common-ligatures; color: #0433ff}

    span.s2 {font-variant-ligatures: no-common-ligatures}

    span.s3 {font-variant-ligatures: no-common-ligatures; color: #3495af}

    span.s4 {font-variant-ligatures: no-common-ligatures; color: #000000}

    span.s5 {font-variant-ligatures: no-common-ligatures; color: #b4261a}

    span.s6 {font-variant-ligatures: no-common-ligatures; color: #008000}

    class FDWeek: NSObject {

    let user = Backendless.sharedInstance().userService.currentUser

    var startDate: Date?

    var weight: Double = 0.0

    var suppPlan: String?

    var objectId: String?

    var created: Date?

    var updated: Date?

    var days: [FDDay] = []

    override init() {

    startDate = NSDate() as Date

    weight = 0.0

    suppPlan = ""

    days = [FDDay]()

    super.init()

    }

    override var description : String {

    let date = Utils.stringFromDate(self.startDate!, format: "dd-MM-yyyy")

    debugPrint("Week start: \(date)")

    debugPrint("Weight: \(weight)")

    debugPrint("Sup Plan: \(suppPlan)")

    debugPrint("Days: \(days.count)")

    return "ObjectId: \(objectId)"

    }

    // MARK: - Backendless

    /**

    Saves Food Diary Week object to Backendless server.

    */

    func saveToServer() {

    Utils.showNetworkIndicator(true)

    MMProgressHUD.show(withStatus: "Saving")

    let dataStore = Backendless.sharedInstance().data.of(FDWeek.ofClass())

    dataStore?.save(

    self,

    response: { (result: Any?) -> Void in

    let obj = result as! FDWeek

    debugPrint("Food Diary Week has been saved: \(obj.objectId!)")

    MMProgressHUD.dismiss(afterDelay: 0.5)

    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "dataSaved"), object: nil)

    Utils.showNetworkIndicator(false)

    },

    error: { (fault: Fault?) -> Void in

    debugPrint("Server reported an error: \(fault!)")

    Utils.showNetworkIndicator(false)

    MMProgressHUD.dismissWithError("\(fault?.message)", title: "Server Error!", afterDelay: 4)

    })

    }

Basically I have a Week that has an array of Days, which has and array of Meals, which has an array of Portions. The save function is the same as with a straight class which doesn't have any arrays in it.

Are those creating the problem?

photo
1

Hello Jorgen,

Could you please provide your FDDay, Meals and Portions class code so we can check this issue.

Regards,

Olga

photo
1

Hi Olga.

This page hung itself when I was writing it. Once I took away the override init from the other classes it started to behave itself again.

Thanks again.