Android Question Error loading app

Makumbi

Well-Known Member
Licensed User
When the code reaches here
B4X:
        'Log(quot.Get("Phone"))
                    'Log(quot.Get("Name"))
                    Log(CustID)
                   
                    Starter.SQL1.ExecNonQuery2("INSERT INTO SMSlist VALUES(?,?,?,?,?,?)", Array As Object(accountd, mname,CustID ,sx, 1, quotd.Get("Phone") ))
    
        
                    'Log(quot.Get("Account"))
                    'Log(quot.Get("Name"))
                    'Log(quot.Get(phone))
                    'Log(quot.Get(sx))
                    Log(RetVal) ' will print in log value returned from the server

i get this error

B4X:
ResponseError. Reason: java.net.SocketTimeoutException: timeout, Response:
0782911364
Error occurred on line: 1660 (Main)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object anywheresoftware.b4a.objects.collections.Map.Get(java.lang.Object)' on a null object reference
    at com.kccug.kabojjajuniorapp.main$ResumableSub_LoadStudents.resume(main.java:6892)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
    at anywheresoftware.b4a.BA$2.run(BA.java:370)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
 

John Naylor

Active Member
Licensed User
Longtime User
I'd be taking a good look at your database table to see what types of values each column supports (and whether they allow Null) then put a breakpoint at line 5 and look at what values are actually being passed to the query.

I suspect one of the values may be null and your table doesn't allow Null in that field.
 
Upvote 0
Top