Hello.
Continuing with my learning from this post:
I followed the tutorial like the video and I get the correct connection on the web browser:
And in the Android device:
But when I execute the command, I have this error:
The only difference is I am trying to connect to a remote database:
I am doing something wrong again or it is the remote server?
Thanks
Continuing with my learning from this post:
CloudKVS - synchronized key / value store - MySQL Learn
Hello. I have worked with SQLite databases in the past and now I need to make a app with a database in the cloud, to write a read data from Android and Windows clients. I see that this post can help me to learn about the solution...
www.b4x.com
I followed the tutorial like the video and I get the correct connection on the web browser:
And in the Android device:
But when I execute the command, I have this error:
PackageAdded: package:b4a.example
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Busqueda...
dbrequestmanager_vv0 (java line: 395)
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/methods/HttpPost;
at anywheresoftware.b4a.http.HttpClientWrapper$HttpUriRequestWrapper.InitializePost2(HttpClientWrapper.java:395)
at anywheresoftware.b4a.samples.httputils2.httpjob._postbytes(httpjob.java:185)
at b4a.example.dbrequestmanager._vv0(dbrequestmanager.java:395)
at b4a.example.dbrequestmanager._vv2(dbrequestmanager.java:181)
at b4a.example.main$ResumableSub_GetRecord.resume(main.java:476)
at b4a.example.main._vvv7(main.java:448)
at b4a.example.main._button1_click(main.java:406)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:6663)
at android.view.View.performClickInternal(View.java:6635)
at android.view.View.access$3100(View.java:794)
at android.view.View$PerformClick.run(View.java:26199)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.client.methods.HttpPost" on path: DexPathList[[zip file "/data/app/b4a.example-PXDxGB5rCDqNkszgJMX6rQ==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-PXDxGB5rCDqNkszgJMX6rQ==/lib/arm64, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 23 more
dbrequestmanager_vv0 (java line: 395)
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/methods/HttpPost;
at anywheresoftware.b4a.http.HttpClientWrapper$HttpUriRequestWrapper.InitializePost2(HttpClientWrapper.java:395)
at anywheresoftware.b4a.samples.httputils2.httpjob._postbytes(httpjob.java:185)
at b4a.example.dbrequestmanager._vv0(dbrequestmanager.java:395)
at b4a.example.dbrequestmanager._vv2(dbrequestmanager.java:181)
at b4a.example.main$ResumableSub_GetRecord.resume(main.java:476)
at b4a.example.main._vvv7(main.java:448)
at b4a.example.main._button1_click(main.java:406)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:6663)
at android.view.View.performClickInternal(View.java:6635)
at android.view.View.access$3100(View.java:794)
at android.view.View$PerformClick.run(View.java:26199)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.client.methods.HttpPost" on path: DexPathList[[zip file "/data/app/b4a.example-PXDxGB5rCDqNkszgJMX6rQ==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-PXDxGB5rCDqNkszgJMX6rQ==/lib/arm64, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 23 more
The only difference is I am trying to connect to a remote database:
Code:
Sub GetRecord
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("select_usuarios", Null)
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)
'work with result
req.PrintTable(res)
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub
I am doing something wrong again or it is the remote server?
Thanks