B4J Question JRDC2 Error fetching connection

cristian petersen

Member
Licensed User
Longtime User
Hello,

I am facing this problem trying to use JRDC in a Synology server.
Downloaded latest Mariadb and Postgres drivers
I created the JRDC.jar with B4J 6.51.
The same error occurs when trying to use Mariadb or Postgres.
I can reach any of the databases using a client administrator from my pc.
I did the tests separated using MariaDB and Postgres. Each time compiling a new jar with the correct DB Driver.
I modified the config.properties according to what I tested Mariadb or Postgres config.jpg
in config.properties I tried with 127.0.0.1, localhost, 10.123.3.14 (server's IP)
Checked also if server ports were opened: OK
I created a folder and execute via Putty: java -jar jRDC.jar
when i check with the browser i get "Error fetching connection"browser.jpg

as result in Putty I have putty.jpg
JRDC log file is attached.

any help would be appreciate!
 

Attachments

  • b4j-2018_11_01.request.log.txt
    5.1 KB · Views: 245

OliverA

Expert
Licensed User
Longtime User
Did you include the JDBC driver via #AdditionalJar in the Main module?
 
Upvote 0

cristian petersen

Member
Licensed User
Longtime User
Yes I did first try with mariadb-java-client-2.3.0 and later on with postgresql-42.2.5.
I am already using JRDC with Mssql in a Windows server.
Its the first time trying to use in a Synology (Linux) server
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
The error you posted usually occurs due to 1) failure to include the correct driver or 2) incorrect jDBC URL for the driver used (you have a no suitable driver exception).
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
What version of Java is on the Synology box?
 
Upvote 0

cristian petersen

Member
Licensed User
Longtime User
As you can see in the attached imaged I am able to access Postgres database using RazorSQL from my pc. And I have the same url and same user.
I will double check evrything again.
clip0002.jpg
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
What version of Java is on the synology box? Looks like the drivers are very version dependent
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
And you downloaded the JDBC 4.2 version? And MergeLibraries is set to True (it is by default)? BTW, out-of-the box, the config.properties file is located in the Files subdirectory of your source jRDC2 files. It is that file that you need to modify. When you compile jRDC2, that file is included inside your .jar file. Any modifications to that file need to be made in the Files directory of your source, at which point you need to recompile your jRDC2 project.
 
Upvote 0
Top