Backendless Support
 
Waiting for user's response

Unable to retrieve User Objects

I have a problem, I recently created a desktop application for which i now an looking to make an app for.

The problem is that using all the instruction provided in the documentation i cannot retrieve objects from the database.

I can easily create objects but when i try to retrieve them a network error occurs which i can't seem to traceback

I would love if someone could guide me or provide me with a working android java script that shows object retrieval

Thank You.

Leave a Comment

Comments (4)

photo
1

Hi Saif,

Here are a few working android java scripts that show object retrieval: http://backendless.com/docs/android/doc.html#data_basic_search

photo
1

Im getting this error. I have tried everything.

06-28 15:45:16.854 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper', referenced from method android.support.v4.view.ViewCompat.addOnUnhandledKeyEventListener

06-28 15:45:16.859 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method android.support.v4.view.ViewCompat.dispatchApplyWindowInsets

06-28 15:45:16.871 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method android.support.v4.view.ViewCompat.onApplyWindowInsets

06-28 15:45:16.873 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'android.view.View$OnUnhandledKeyEventListener', referenced from method android.support.v4.view.ViewCompat.removeOnUnhandledKeyEventListener

06-28 15:45:16.879 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'android.support.v4.view.ViewCompat$1', referenced from method android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener

06-28 15:45:16.919 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering

06-28 15:45:17.057 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'io.socket.client.IO$Options', referenced from method com.backendless.rt.SocketIOConnectionManager.get

06-28 15:45:17.114 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'org.hibernate.proxy.HibernateProxy', referenced from method weborb.writer.MessageWriter.initWriters

06-28 15:45:17.115 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'java.time.LocalDateTime', referenced from method weborb.writer.MessageWriter.initWriters

06-28 15:45:17.116 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'javax.servlet.http.HttpSession', referenced from method weborb.writer.MessageWriter.writeObject

06-28 15:45:17.122 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'weborb.types.jdbc.JDBCResultSet', referenced from method weborb.writer.ResultSetWriter.write

06-28 15:45:22.227 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'javax.servlet.http.HttpServletRequest', referenced from method weborb.util.ThreadContext.getContext

06-28 15:45:22.228 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'javax.servlet.http.HttpServletRequest', referenced from method weborb.util.ThreadContext.getHttpRequest

06-28 15:45:22.228 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'javax.servlet.http.HttpServletResponse', referenced from method weborb.util.ThreadContext.getHttpResponse

06-28 15:45:22.229 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'javax.servlet.http.HttpSession', referenced from method weborb.util.ThreadContext.getHttpSession

06-28 15:45:22.229 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'javax.servlet.http.HttpSession', referenced from method weborb.util.ThreadContext.getHttpSessionId

06-28 15:45:22.239 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'weborb.service.cacheinvalidatorevent.CacheInvalidator', referenced from method weborb.util.cache.Cache.ensureSubscription

06-28 15:45:22.241 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'weborb.service.ICacheInvalidator', referenced from method weborb.util.cache.Cache.getValue

06-28 15:45:22.241 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'weborb.service.WebORBCacheAttribute', referenced from method weborb.util.cache.Cache.getValue

06-28 15:45:22.242 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'weborb.service.WebORBCacheAttribute', referenced from method weborb.util.cache.Cache.invalidateCache

06-28 15:45:22.242 21830-21830/com.example.saifu.nustana E/dalvikvm: Could not find class 'weborb.service.WebORBCacheAttribute', referenced from method weborb.util.cache.Cache.saveValue

06-28 15:45:22.377 21830-21830/com.example.saifu.nustana E/AndroidRuntime: FATAL EXCEPTION: main

Process: com.example.saifu.nustana, PID: 21830

BackendlessException{ code: 'Internal client exception', message: 'android.os.NetworkOnMainThreadException

at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1157)

at java.net.InetAddress.lookupHostByName(InetAddress.java:443)

at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)

at java.net.InetAddress.getAllByName(InetAddress.java:214)

at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)

at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)

at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)

at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)

at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)

at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)

at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:355)

at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)

at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)

at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254)

at weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:195)

at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:140)

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.persistence.MapDrivenDataStore.findFirst(MapDrivenDataStore.java:198)

at com.backendless.persistence.MapDrivenDataStore.findFirst(MapDrivenDataStore.java:48)

at com.example.saifu.nustana.MainActivity$1.onClick(MainActivity.java:37)

at android.view.View.performClick(View.java:4476)

at android.view.View$PerformClick.run(View.java:18822)

at android.os.Handler.handleCallback(Handler.java:808)

at android.os.Handler.dispatchMessage(Handler.java:103)

at android.os.Looper.loop(Looper.java:193)

at android.app.ActivityThread.main(ActivityThread.java:5551)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:515)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:730)

at dalvik.system.NativeStart.main(Native Method)

', extendedData: '{}', detail: 'android.os.NetworkOnMainThreadException

at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1157)

at java.net.InetAddress.lookupHostByName(InetAddress.java:443)

at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)

at java.net.InetAddress.getAllByName(InetAddress.java:214)

at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)

at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)

at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)

at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)

at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)

at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)

at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:355)

at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)

at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)

at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254)

at weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:195)

at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:140)

at weborb.client.WeborbClient.invoke(WeborbClient.java:138)

at com.backendless.Invoker.invokeSync(Invoker.java:95)

at com

photo
1

I am receiving error code 1010, saying that my object store is empty.

What does it mean?

photo
photo
1

Please provide a minimal verifiable project to reproduce the error. Was not able to reproduce it in Android

Anton