L leitor79 Active Member Licensed User Longtime User Jun 27, 2016 #1 Hi, Is this OK? "Config" is a code module. Why is null? That line gives me the following exception: java.lang.Exception: java.lang.reflect.InvocationTargetException Besides, the exception is not intercepted in the catch shown in the image, but in the catch block of the ActualizarSinLeer caller. This code block is part of a class. Regards,
Hi, Is this OK? "Config" is a code module. Why is null? That line gives me the following exception: java.lang.Exception: java.lang.reflect.InvocationTargetException Besides, the exception is not intercepted in the catch shown in the image, but in the catch block of the ActualizarSinLeer caller. This code block is part of a class. Regards,
Erel B4X founder Staff member Licensed User Longtime User Jun 27, 2016 #2 It is ok. This is not the reason for the error. Can you post the full error message from the logs? Upvote 0
Eme Fibonacci Well-Known Member Licensed User Longtime User Jun 27, 2016 #3 Can you post the Sub Config.GetSQL? Or a fragment this? Upvote 0
L leitor79 Active Member Licensed User Longtime User Jun 27, 2016 #4 Hi Erel, Hi Eme, thanks for your answer. This is the full error: Error occurred on line: 377 (clsConversacion) java.lang.NullPointerException at anywheresoftware.b4a.debug.RDebugUtils.setLastException(RDebugUtils.java:17) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:742) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:265) at eitorteam.privapp.config._mensajerecibido(config.java:665) at eitorteam.privapp.starter._objmqtt_messagearrived(starter.java:400) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:697) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134) at anywheresoftware.b4a.BA$2.run(BA.java:328) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5146) 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:732) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566) at dalvik.system.NativeStart.main(Native Method) Click to expand... And this is the code of GetSQL: Code: Copy Public Sub GetSQL() As SQL Dim rSQL As SQL Try If oSQL=Null Or oSQL.IsInitialized=False Then oSQL.Initialize(File.DirInternal, "dbfile", False) End If rSQL=oSQL Catch Log("Config - GetSQL - " & LastException.Message) End Try Return rSQL End Sub oSQL is declared as Public oSQL As SQL at module's Process_Globals. Thank you very much! Upvote 0
Hi Erel, Hi Eme, thanks for your answer. This is the full error: Error occurred on line: 377 (clsConversacion) java.lang.NullPointerException at anywheresoftware.b4a.debug.RDebugUtils.setLastException(RDebugUtils.java:17) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:742) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:265) at eitorteam.privapp.config._mensajerecibido(config.java:665) at eitorteam.privapp.starter._objmqtt_messagearrived(starter.java:400) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:697) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134) at anywheresoftware.b4a.BA$2.run(BA.java:328) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5146) 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:732) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566) at dalvik.system.NativeStart.main(Native Method) Click to expand... And this is the code of GetSQL: Code: Copy Public Sub GetSQL() As SQL Dim rSQL As SQL Try If oSQL=Null Or oSQL.IsInitialized=False Then oSQL.Initialize(File.DirInternal, "dbfile", False) End If rSQL=oSQL Catch Log("Config - GetSQL - " & LastException.Message) End Try Return rSQL End Sub oSQL is declared as Public oSQL As SQL at module's Process_Globals. Thank you very much!
Eme Fibonacci Well-Known Member Licensed User Longtime User Jun 27, 2016 #5 oSQL is declared as Public oSQL As SQL at module's Process_Globals. Click to expand... Hi, oSQL is Public? But you are declaring oSQL again. See the image of the first post. Just below m.put ("... Sorry if this is not the case. Upvote 0
oSQL is declared as Public oSQL As SQL at module's Process_Globals. Click to expand... Hi, oSQL is Public? But you are declaring oSQL again. See the image of the first post. Just below m.put ("... Sorry if this is not the case.