Hi,
I'm starting with DonManfred Mysql Library.
I've copied MSMySQL.jar, MSMySQL.xml and mysql-connector-java-5.1.34-bin.jar in the additional folder.
Here is the piece of code I'm testing :
and I got these errors :
I need your help
I'm starting with DonManfred Mysql Library.
I've copied MSMySQL.jar, MSMySQL.xml and mysql-connector-java-5.1.34-bin.jar in the additional folder.
Here is the piece of code I'm testing :
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim cDbIP As String :cDbIP="192.168.1.5"
Dim cDataBase As String :cDataBase="joomla"
Dim cDbUserName As String :cDbUserName="root"
Dim cDbPassword As String :cDbPassword="*******"
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private oConnection As MySQL
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
Try
oConnection.Initialize("anser", cDbIP, cDbUserName, cDbPassword, cDataBase, True, True)
Catch
Msgbox("Unable to connect to the server","Server unavailable")
End Try
End If
End Sub
and I got these errors :
Logger connected to: HUAWEI FRD-L09
--------- beginning of main
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.ExceptionInInitializerError
at com.mysql.jdbc.Util.stackTraceToString(Util.java:330)
at com.mysql.jdbc.Util.<clinit>(Util.java:112)
at com.mysql.jdbc.NonRegisteringDriver.parseURL(NonRegisteringDriver.java:728)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:316)
at java.sql.DriverManager.getConnection(DriverManager.java:179)
at java.sql.DriverManager.getConnection(DriverManager.java:213)
at de.donmanfred.b4a.MySQL.connect(MySQL.java:783)
at de.donmanfred.b4a.MySQL.connect(MySQL.java:812)
at de.donmanfred.b4a.MySQL.Initialize(MySQL.java:113)
at b4a.example.main._activity_create(main.java:384)
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:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5665)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)
Caused by: java.lang.RuntimeException: Can't load resource bundle due to underlying exception java.util.MissingResourceException: Can't find resource for bundle 'com.mysql.jdbc.LocalizedErrorMessages_fr_FR', key ''
at com.mysql.jdbc.Messages.<clinit>(Messages.java:54)
... 26 more
Caused by: java.util.MissingResourceException: Can't find resource for bundle 'com.mysql.jdbc.LocalizedErrorMessages_fr_FR', key ''
at java.util.ResourceBundle.missingResourceException(ResourceBundle.java:238)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:230)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:139)
at com.mysql.jdbc.Messages.<clinit>(Messages.java:52)
... 26 more
** Activity (main) Resume **
I need your help