Hi there.
I’m trying to migrate my Java application to 4.0 and Counters API is return exceptions like that:
com.backendless.exceptions.BackendlessException: unable to find method in class. method name reset
at com.backendless.Invoker$SyncResponder.errorHandler(Invoker.java:122)
at com.backendless.core.responder.AdaptingResponder.handledAsFault(AdaptingResponder.java:120)
at com.backendless.core.responder.AdaptingResponder.responseHandler(AdaptingResponder.java:75)
at weborb.client.ioEngine.HttpIOEngine.processAMFResponse(HttpIOEngine.java:292)
at weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:213)
at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:143)
at weborb.client.WeborbClient.invoke(WeborbClient.java:138)
at com.backendless.Invoker.invokeSync(Invoker.java:95)
at com.backendless.Invoker.invokeSync(Invoker.java:107)
at com.backendless.Counters.reset(Counters.java:73)
at com.backendless.AtomicOperationFactory$1.reset(AtomicOperationFactory.java:36)
I tried various methods and I’m always getting same error.
Code line:
Backendless.Counters.reset("countread");
Can you help me?
Thank you a lot!
Hi Alexandre,
We will check and let you know.
Regards,
Mark
I’ve got the same problem with the get methode in my business logic:
BackendlessException{ code: ‘Server.Processing’, message: ‘unable to find method in class. method name get’ }
at com.backendless.Invoker$SyncResponder.errorHandler(Invoker.java:122)
at com.backendless.core.responder.AdaptingResponder.handledAsFault(AdaptingResponder.java:120)
at com.backendless.core.responder.AdaptingResponder.responseHandler(AdaptingResponder.java:75)
at weborb.client.ioEngine.HttpIOEngine.processAMFResponse(HttpIOEngine.java:292)
at weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:213)
at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:143)
at weborb.client.WeborbClient.invoke(WeborbClient.java:138)
at com.backendless.Invoker.invokeSync(Invoker.java:95)
at com.backendless.Invoker.invokeSync(Invoker.java:107)
at com.backendless.Counters.runGetOperation(Counters.java:227)
at com.backendless.Counters.get(Counters.java:83)
Kirs, and Alexandre,
We’re looking into the problem and will report back shortly.
Regards,
Mark
Hi Kirs and Alexandra
We’ve reproduced the issue and working on solution. The fix will be available in the next few days. I’ll notify you here when it’s done. For tracking purposes you may reference it by id BKNDLSS-14579
Regards Anton
Hi guys
Issue has been fixed could you please verify?
Regards Anton
Hello Anton…
Just tried it and now the function works! Thx!
Anton,
For me the code:
Backendless.Counters.get(counterName)
Is return throwing:
redis.clients.jedis.exceptions.JedisDataException: value sent to redis cannot be null
The counter was successful started before with:
Backendless.Counters.addAndGet(counterName, 0l);
I don’t know what to do.
Alexandre,
What is your application ID and the name of the counter?
Mark
Application ID: 96DFBC3B-1681-2FAD-FFFA-733F8EDA8A00
Name of the counter: 6D44590C-89CC-FC95-FFDF-186CC1E76100 (I create a counter for each Publication object and I use the object ID as counter’s names).
I just ran the following Java program and got the value of 0:
package com.mbaas.counters;
import com.backendless.Backendless;
public class Main
{
public static void main( String[] args )
{
Backendless.initApp( YOUR-APP-ID, ANDROID-JAVA-API-KEY );
Long counterValue = Backendless.Counters.get( "6D44590C-89CC-FC95-FFDF-186CC1E76100" );
System.out.println( counterValue );
}
}
Mark,
I’m sorry, my mistake in another part of the program.
It’s working fine now.
Thank you.
Great! I am glad it is working for you.