B4J Question jRDC2 How to run and configure the connector to mysql

Cassie

Member
Licensed User
Longtime User
Hi Guys,

This is my first time developing in B4J application and I read about the jRDC (remote database connector) which is good implementation.

Anyone who can post a detailed instruction how to run the server (middle-ware) and how to configure it to connect on mysql database. I tried running the jRDC2 and i have a missing library Byte Converter which i could not find a download link so instead I use the Byte Converter library of B4a (I don't know if its okey or not).

If you can upload any small sample db, config for jRDC2 and small client apps will be appreciated.

Thank you in advance for this great community.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
so instead I use the Byte Converter library of B4a
This is the correct library.

The configuration file should include:
B4X:
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8

And this attribute in the main module:
B4X:
#AdditionalJar: mysql-connector-java-5.1.27-bin
 
Upvote 0

Cassie

Member
Licensed User
Longtime User
Hi Erel,

I download the jRDC2.zip and extract it change the config.properties to

#DATABASE CONFIGURATION
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
User=a
Password=a
#Java server port
ServerPort=17178

I created a test database and created a user a with a password a.

I run the server and log jRDC is running (version = 2.1)

I go to browser and run http://localhost:17178/?method=test in url and i receive an error:

HTTP ERROR 404
Problem accessing /. Reason:

Not Found
Powered by Jetty:// 9.4.z-SNAPSHOT

Is there anything I missed or need to be done. Btw i put my
mysql-connector-java-5.1.43-bin instead on mysql-connector-java-5.1.27-bin since i could not found .27 version at the B4J Libraries folder.

Thanks in advance.


 
Upvote 0

Cassie

Member
Licensed User
Longtime User
The test link is:
http://localhost:17178/test

Thank your for your quick response and it works. Maybe this must be updated to http://localhost:17178/test

upload_2017-8-7_23-7-13.png
 
Upvote 0
Top