Android Question dbresult Rows is null

azzam223

Active Member
Licensed User
Longtime User
hello every one I have problem with dbresult object when I try To receive data from my database the columns number is visible, but the rows object is return null I did not What is the problem

I Followed the RDC server To see what the problem every thing is good also the rows Is not null but in dbreqmanager after convert from byte to object the rows object return to Null
 

azzam223

Active Member
Licensed User
Longtime User
B4X:
    Dim cmd As DBCommand
        cmd.Initialize
        cmd.Name="GetAllCities"
        Dim j As HttpJob
        Wait For(reqManager.ExecuteQuery(cmd,0,Null)) JobDone(j As HttpJob)
    If j.success Then
reqManager.HandleJobAsync(j,"req")
        Wait For(reqManager) req_Result(result as dbresult)
reqManager.PrintTable(result)
 
Upvote 0

azzam223

Active Member
Licensed User
Longtime User
B4X:
** Service (httputils2service) Start **
Error occurred on line: 171 (Main)
java.lang.NullPointerException: null receiver
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
    at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:19)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:240)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:132)
    at anywheresoftware.b4a.BA$2.run(BA.java:360)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7225)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
 
Upvote 0

azzam223

Active Member
Licensed User
Longtime User
B4X:
Dim req As DBRequestManagerR=CreateRequest
        Dim cmd As DBCommand
        cmd.Initialize
        cmd.Name="GetAllCities"
        Dim j As HttpJob
        Wait For(req.ExecuteQuery(cmd,0,Null)) JobDone(j As HttpJob)
        If j.success Then
            req.HandleJobAsync(j,"req")
            Wait For(req) req_result(res As DBResult)

also same problem happens erel

this the unfilter log
B4X:
Logger connected to:  samsung SM-N910C
--------- beginning of main
SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=awqaf.Visitor
TimaSignature is unavailable
Added TimaKeyStore provider
ClassLoader referenced unknown path: /data/app/awqaf.Visitor-1/lib/arm
Starting remote logger. Port: 25883
--------- beginning of system
Metadata value : none
#1 mView = com.android.internal.policy.PhoneWindow$DecorView{e133a08 I.E...... R.....ID 0,0-0,0}
Use EGL_SWAP_BEHAVIOR_PRESERVED: true
eglInitialize EGLDisplay = 0xb31f67c4
Initialized EGL, version 1.4
new_window_surface returns 0x3000,  [1440x2560]-format:1
updateVisibility : ActivityRecord{953759e token=android.os.BinderProxy@1ae3ab {awqaf.Visitor/awqaf.Visitor.main}} show : true
*** Debugger waiting for connection (0) ***
#1 mView = com.android.internal.policy.PhoneWindow$DecorView{ac7e877 V.E...... R.....I. 0,0-0,0}
MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
new_window_surface returns 0x3000,  [1336x384]-format:1
MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
Timeline: Activity_idle id: android.os.BinderProxy@1ae3ab time:2034411
*** Debugger waiting for connection (1) ***
After accept
** Activity (main) Create, isFirst = true **
setTypeface with style : 0
setTypeface with style : 0
** Activity (main) Resume **
Skipped 85 frames!  The application may be doing too much work on its main thread.
MSG_RESIZED: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 1012) or=1
MSG_RESIZED: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
MSG_RESIZED: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 1012) or=1
MSG_RESIZED: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
** Activity (main) Resume **
Timeline: Activity_idle id: android.os.BinderProxy@1ae3ab time:2049632
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
Skipped 514 frames!  The application may be doing too much work on its main thread.
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
Thread-1711(ApacheHTTPLog):Reading from variable values from setDefaultValuesToVariables
Thread-1711(ApacheHTTPLog):isSBSettingEnabled false
Thread-1711(ApacheHTTPLog):isShipBuild true
Thread-1711(ApacheHTTPLog):getDebugLevel 0x4f4c
Thread-1711(ApacheHTTPLog):Smart Bonding Setting is false
Thread-1711(ApacheHTTPLog):SmartBonding Setting is false, SHIP_BUILD is true, log to file is false, DBG is false, DEBUG_LEVEL (1-LOW, 2-MID, 3-HIGH) is 1
pool-3-thread-1 calls detatch()
new_window_surface returns 0x3000,  [1336x384]-format:1
MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
new_window_surface returns 0x3000,  [1336x400]-format:1
new_window_surface returns 0x3000,  [1336x384]-format:1
MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
new_window_surface returns 0x3000,  [1336x400]-format:1
Error occurred on line: 184 (Main)
java.lang.NullPointerException: null receiver
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
    at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:19)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:240)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:132)
    at anywheresoftware.b4a.BA$2.run(BA.java:360)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7225)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
new_window_surface returns 0x3000,  [1336x384]-format:1
-1 received
writer error
java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1988)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)
    at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:357)
    at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
    at java.lang.Thread.run(Thread.java:818)
Starting remote logger. Port: 25883
After accept
 
Upvote 0

azzam223

Active Member
Licensed User
Longtime User
B4X:
(NullPointerException) java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference
 
Upvote 0

azzam223

Active Member
Licensed User
Longtime User
B4X:
sql.GetAllCities=select * from centers

there no errors in server

not only GetAllCities command All Return command

When I followed this command in server the rows object is not null but when I followed in DbRequestmanger specially in ConvertBytesToObjectAsync method the columns list is fine but rows list is null
 
Last edited:
Upvote 0

azzam223

Active Member
Licensed User
Longtime User
this log from Release mode
B4X:
Logger connected to:  samsung SM-N910C
--------- beginning of system
Metadata value : none
--------- beginning of main
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
Get MotionRecognitionManager
mSContextService = android.hardware.scontext.ISContextService$Stub$Proxy@3b10a44
motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@81a472d
motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@81a472d
#1 mView = android.widget.PopupWindow$PopupDecorView{9ee59f3 V.E...... ......I. 0,0-0,0}
new_window_surface returns 0x3000,  [917x1]-format:1
MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
ViewPostImeInputStage processPointer 0
#3 mView = null
Attempted to finish an input event but the input event receiver has already been disposed.
sendUserActionEvent() mView == null
-1 received
writer error
java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1988)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)
    at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:357)
    at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
    at java.lang.Thread.run(Thread.java:818)
#3 mView = null
System.exit called, status: 0
VM exiting with result code 0, cleanup skipped.
SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=awqaf.Visitor
TimaSignature is unavailable
Added TimaKeyStore provider
ClassLoader referenced unknown path: /data/app/awqaf.Visitor-2/lib/arm
Starting remote logger. Port: 25883
Metadata value : none
#1 mView = com.android.internal.policy.PhoneWindow$DecorView{1ab058a I.E...... R.....ID 0,0-0,0}
Use EGL_SWAP_BEHAVIOR_PRESERVED: true
eglInitialize EGLDisplay = 0xaeac57c4
Initialized EGL, version 1.4
new_window_surface returns 0x3000,  [1440x2560]-format:1
** Activity (main) Create, isFirst = true **
After accept
setTypeface with style : 0
setTypeface with style : 0
** Activity (main) Resume **
MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
Skipped 59 frames!  The application may be doing too much work on its main thread.
DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
Timeline: Activity_idle id: android.os.BinderProxy@fc083f5 time:1520813
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
ViewPostImeInputStage processPointer 0
ViewPostImeInputStage processPointer 1
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
setTypeface with style : 0
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
Thread-1841(ApacheHTTPLog):Reading from variable values from setDefaultValuesToVariables
Thread-1841(ApacheHTTPLog):isSBSettingEnabled false
Thread-1841(ApacheHTTPLog):isShipBuild true
Thread-1841(ApacheHTTPLog):getDebugLevel 0x4f4c
Thread-1841(ApacheHTTPLog):Smart Bonding Setting is false
Thread-1841(ApacheHTTPLog):SmartBonding Setting is false, SHIP_BUILD is true, log to file is false, DBG is false, DEBUG_LEVEL (1-LOW, 2-MID, 3-HIGH) is 1
pool-3-thread-1 calls detatch()
(NullPointerException) java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference
Failed to destroy process 31056
android.system.ErrnoException: kill failed: ESRCH (No such process)
    at libcore.io.Posix.kill(Native Method)
    at libcore.io.ForwardingOs.kill(ForwardingOs.java:105)
    at java.lang.ProcessManager$ProcessImpl.destroy(ProcessManager.java:260)
    at anywheresoftware.b4a.remotelogger.RemoteLogger.LogCatStop(RemoteLogger.java:132)
    at anywheresoftware.b4a.remotelogger.RemoteLogger.handleIncomingData(RemoteLogger.java:62)
    at anywheresoftware.b4a.remotelogger.Connector.readData(Connector.java:134)
    at anywheresoftware.b4a.remotelogger.Connector.mainLoop(Connector.java:84)
    at anywheresoftware.b4a.remotelogger.Connector.run(Connector.java:53)
    at java.lang.Thread.run(Thread.java:818)
-1 received
writer error
java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1988)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)
    at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:357)
    at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
    at java.lang.Thread.run(Thread.java:818)
java.net.SocketException: shutdown failed: ENOTCONN (Transport endpoint is not connected)
    at java.net.PlainSocketImpl.shutdownInput(PlainSocketImpl.java:361)
    at java.net.Socket.shutdownInput(Socket.java:635)
    at anywheresoftware.b4a.remotelogger.Connector.mainLoop(Connector.java:105)
    at anywheresoftware.b4a.remotelogger.Connector.run(Connector.java:53)
    at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: shutdown failed: ENOTCONN (Transport endpoint is not connected)
    at libcore.io.Posix.shutdown(Native Method)
    at libcore.io.ForwardingOs.shutdown(ForwardingOs.java:159)
    at java.net.PlainSocketImpl.shutdownInput(PlainSocketImpl.java:359)
    ... 4 more
Starting remote logger. Port: 25883
After accept
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Which version of jRCD (just checking)? Looking at the servers ExecuteQuery2 method in the RDCHandler, I do not see how columns can have data but rows, at a minimum, not be initialized (rows may not get populated, but it does get at least initialized). Have you done any modifications to the DBRequestManager? You have
B4X:
Dim req As DBRequestManagerR=CreateRequest
, but with an unaltered request manager I would expect
B4X:
Dim req As DBRequestManager=CreateRequest
. Have you modified the jRDC2 code? Finally, at minimum, it would be nice if you would upload a minimal client project that can reproduce this error, your jRDC2 code (if it's modified). A minimal config.properties file. The table structure and some test data insert statements. Else it may be tough to reproduce/troubleshoot your issue.
 
Upvote 0

azzam223

Active Member
Licensed User
Longtime User
Hi @OliverA thanks I did not change any thing in
DBRequestManager and the name
DBRequestManagerR is correct

thanks For helping My Friend

Erel When I Create New project And test it is working but why did not working in the last project I created I will try To check the project to see what happens

there are no errors in server log
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
why did not working in the last project I created I
You never posted your complete code. You are accessing columns/rows and it looks like when you access the rows the app blows up. When you created the new app, did you do the exact same code (just in a new app), or did you just do a new app with new code? It be interesting to see what happens when you paste the code from the app that errors out into the new app.
 
Upvote 0

azzam223

Active Member
Licensed User
Longtime User
Yes
You never posted your complete code. You are accessing columns/rows and it looks like when you access the rows the app blows up. When you created the new app, did you do the exact same code (just in a new app), or did you just do a new app with new code? It be interesting to see what happens when you paste the code from the app that errors out into the new app.

Yes I do exact as the last project maybe there are some thing make this error I will check to see
 
Upvote 0
Top