Hello!
I'm trying to run the ServerExample (https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/#content) on my NAS Synology.
This device uses MariaDB10 instead of MySQL.
So, I've done some modification to ServerExample (renamed in ServerExampleMariaDB) code:
Then I opened the chosen port (51052 as set in setting.txt) on router and run the ServerExampleMariaDB.jar in Task Scheduler, following "my precedent success" for the HelloWorldServer example.
But the server program doesn't work and the task results "Interrupted" and I've gotten "ERR_CONNECTION_REFUSED".
This is my first attempt to manage a client-server DB; maybe do I miss some basic passage?
Any support will be welcome!
Thank you!
I'm trying to run the ServerExample (https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/#content) on my NAS Synology.
This device uses MariaDB10 instead of MySQL.
So, I've done some modification to ServerExample (renamed in ServerExampleMariaDB) code:
- I've downloaded "mariadb-java-client-2.7.1.jar" library (from here) and I've added it in Additional libraries folder
- in the Main module I've substituted
B4X:
#AdditionalJar: mysql-connector-java-5.1.27-bin
B4X:#AdditionalJar: mariadb-java-client-2.7.1
- in the settings.txt file I've substituted
B4X:
JdbcUrl=jdbc:mysql://localhost/b4j_server?characterEncoding=utf8 DriverClass=com.mysql.jdbc.Driver DBUser=root DBPassword= RecaptchaPrivateKey= Port=51042 [*]
B4X:JdbcUrl=jdbc:mariadb://localhost/b4j_server?characterEncoding=utf8 DriverClass=org.mariadb.jdbc.Driver DBUser=root DBPassword= RecaptchaPrivateKey= Port=51052 [*]
- I've run the ServerExampleMariaDB code in release mode and copied on web folder the ServerExampleMariaDB.jar, the "www" folder; I've created at same level of "www" folder on NAS, the folder "libs" with all the libraries listed by the info compile windows:
B4X:
B4J Version: 8.50
Java Version: 8
Parsing code. (0.10s)
Building folders structure. (0.03s)
Compiling code. (0.09s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. (0.01s)
Building jar file. (0.05s)
Jar file created: D:\B4X\B4J-Projects\ServerExample\Objects\ServerExample.jar
Libraries were not merged into jar file.
The following libraries should be distributed in the libs folder:
ByteConverter.jar
Encryption.jar
jCore.jar
jCustomToast.jar
jDateUtils.jar
jExcel.jar
jHTTP.jar
jServer.jar
Json.jar
jSQL.jar
jStringUtils.jar
jxl.jar
httpcore-4.0.jar
commons-logging-1.1.3.jar
jetty_b4j.jar
c3p0-0.9.5.2.jar
c3p0-oracle-thin-extras-0.9.5.2.jar
mchange-commons-java-0.2.11.jar
sqlite-jdbc-3.7.2.jar
mariadb-java-client-2.7.1.jar
Running application. (5.30s)
Completed successfully.
Then I opened the chosen port (51052 as set in setting.txt) on router and run the ServerExampleMariaDB.jar in Task Scheduler, following "my precedent success" for the HelloWorldServer example.
But the server program doesn't work and the task results "Interrupted" and I've gotten "ERR_CONNECTION_REFUSED".
This is my first attempt to manage a client-server DB; maybe do I miss some basic passage?
Any support will be welcome!
Thank you!
Last edited: