Oct 13, 2015 Replies: 37 jRDC version 2 is available here: https://www.b4x.com/android/forum/t...ation-of-rdc-remote-database-connector.61801/ Please start with this thread if you are not familiar with RDC: Remote Database Connector (RDC) - Connect to any remote DB RDC was implemented before B4J was available. It was implemented in Java. jRDC is a port of RDC server to B4J. The main advantage of jRDC over RDC is that you can modify the source code. For example you can easily add support for SSL or connect to multiple databases. The performance of both servers is the same. Note that B4J creates executable jars so you can start the server with a double click or from the command line with: Code: Copy java -jar jRDC.jar There are some differences between the behavior and configuration of jRDC and RDC: On the client, the server link should end with /rdc. For example: Code: Copy reqManager.Initialize(Me, "http://192.168.0.6:17178/rdc") You need to set the jdbc jar with the #AdditionalJar attribute (on the server). There is no jdbc_driver folder. jRDC always returns 0 for the affected rows fields in batch requests. From the client side you just need to add /rdc to the link and it should work. There is another difference related to the way nulls are handled. It shouldn't be a problem with new jdbc drivers. jRDC v1.00 is attached. It fixes an issue related to blobs. Attachments jRDC.zip jRDC.zip 4.8 KB · Views: 1,742 Last edited: Dec 29, 2015 Click to expand...
jRDC version 2 is available here: https://www.b4x.com/android/forum/t...ation-of-rdc-remote-database-connector.61801/ Please start with this thread if you are not familiar with RDC: Remote Database Connector (RDC) - Connect to any remote DB RDC was implemented before B4J was available. It was implemented in Java. jRDC is a port of RDC server to B4J. The main advantage of jRDC over RDC is that you can modify the source code. For example you can easily add support for SSL or connect to multiple databases. The performance of both servers is the same. Note that B4J creates executable jars so you can start the server with a double click or from the command line with: Code: Copy java -jar jRDC.jar There are some differences between the behavior and configuration of jRDC and RDC: On the client, the server link should end with /rdc. For example: Code: Copy reqManager.Initialize(Me, "http://192.168.0.6:17178/rdc") You need to set the jdbc jar with the #AdditionalJar attribute (on the server). There is no jdbc_driver folder. jRDC always returns 0 for the affected rows fields in batch requests. From the client side you just need to add /rdc to the link and it should work. There is another difference related to the way nulls are handled. It shouldn't be a problem with new jdbc drivers. jRDC v1.00 is attached. It fixes an issue related to blobs.
incendio Well-Known Member Licensed User Longtime User Dec 6, 2015 #21 I got error when trying to run it on Raspberry Pi2 Here is the error : java.lang.RuntimeException: Cannot parse: null as boolean at anywheresoftware.b4a.BA.parseBoolean(BA.java:273) at anywheresoftware.b4a.BA.ObjectToBoolean(BA.java:342) at b4j.example.rdcconnector._initialize(rdcconnector.java:90) at b4j.example.main._appstart(main.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccesjava:57) Jave ver on Raspberry is "1.7.0_40"
I got error when trying to run it on Raspberry Pi2 Here is the error : java.lang.RuntimeException: Cannot parse: null as boolean at anywheresoftware.b4a.BA.parseBoolean(BA.java:273) at anywheresoftware.b4a.BA.ObjectToBoolean(BA.java:342) at b4j.example.rdcconnector._initialize(rdcconnector.java:90) at b4j.example.main._appstart(main.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccesjava:57) Jave ver on Raspberry is "1.7.0_40"
R Roycefer Well-Known Member Licensed User Longtime User Dec 6, 2015 #22 Check the RDConnector.Initialize method. It says you're trying to parse a Null as a Boolean, which it can't do.
Check the RDConnector.Initialize method. It says you're trying to parse a Null as a Boolean, which it can't do.
incendio Well-Known Member Licensed User Longtime User Dec 6, 2015 #23 Thanks for your replied. Found the problem. It was in the config file. Missing the line Debug=true which is called in the Initialize method.
Thanks for your replied. Found the problem. It was in the config file. Missing the line Debug=true which is called in the Initialize method.
Bladimir Carrillo Member Licensed User Longtime User Dec 14, 2015 #24 I tested my last app with jRDC (it's running perfectly with RDC) but have the following: - ExecuteQuery (with SELECT) works well and return the correct results. - ExecuteCommand (with INSERT or UPDATE) apparently successful execution returns (to jobDone Sub) but the database does not reflect changes. May be a bug?
I tested my last app with jRDC (it's running perfectly with RDC) but have the following: - ExecuteQuery (with SELECT) works well and return the correct results. - ExecuteCommand (with INSERT or UPDATE) apparently successful execution returns (to jobDone Sub) but the database does not reflect changes. May be a bug?
Erel B4X founder Staff member Licensed User Longtime User Dec 14, 2015 #25 Inserts and updates should work. Are there any errors in the server output?
Bladimir Carrillo Member Licensed User Longtime User Dec 14, 2015 #26 Erel said: Inserts and updates should work. Are there any errors in the server output? Click to expand... No any errors
Erel said: Inserts and updates should work. Are there any errors in the server output? Click to expand... No any errors
Erel B4X founder Staff member Licensed User Longtime User Dec 14, 2015 #27 Which database are you using?
Bladimir Carrillo Member Licensed User Longtime User Dec 15, 2015 #28 Erel said: Which database are you using? Click to expand... I'm using oracle (ojdbc6.jar)
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2015 #29 Are you 100% that the updates are not persisted? Try to create a new table and insert some data. An exception will be thrown if the JDBC driver reports any error.
Are you 100% that the updates are not persisted? Try to create a new table and insert some data. An exception will be thrown if the JDBC driver reports any error.
Bladimir Carrillo Member Licensed User Longtime User Dec 15, 2015 #30 Erel said: Are you 100% that the updates are not persisted? Try to create a new table and insert some data. An exception will be thrown if the JDBC driver reports any error. Click to expand... Yes Erel, when I stop jRDC and enable RDC again (with same configuration config.properties file) then works fine.
Erel said: Are you 100% that the updates are not persisted? Try to create a new table and insert some data. An exception will be thrown if the JDBC driver reports any error. Click to expand... Yes Erel, when I stop jRDC and enable RDC again (with same configuration config.properties file) then works fine.
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2015 #31 You will need to debug it. See which command is not working. RDC and jRDC are almost identical.
Bladimir Carrillo Member Licensed User Longtime User Dec 16, 2015 #32 Erel said: You will need to debug it. See which command is not working. RDC and jRDC are almost identical. Click to expand... jRDC Debugging results: Tests with oralce jdbc driver (ojdbc6.jar) TEST 1 - Server runing on B4J ide / Debug(rapid) mode - Client runing installed app - Requests from client: * SELECT. All OK * UPDATE or INSERT. Connection to server crashes and any type of requests works (nor SELECT nor INSERT nor UPDATE), but continued running jRDC application on IDE. Any error is displayed on B4J ide. TEST 2 - Server runing jRDC.jar - Client runing on B4A ide / Debug(rapid) mode - Requests from client: * SELECT. All OK * UPDATE or INSERT. "java.net.SocketTimeoutException" error on Job.ErrorMessage. Connection to server do not crashes and SELECT requests only works.
Erel said: You will need to debug it. See which command is not working. RDC and jRDC are almost identical. Click to expand... jRDC Debugging results: Tests with oralce jdbc driver (ojdbc6.jar) TEST 1 - Server runing on B4J ide / Debug(rapid) mode - Client runing installed app - Requests from client: * SELECT. All OK * UPDATE or INSERT. Connection to server crashes and any type of requests works (nor SELECT nor INSERT nor UPDATE), but continued running jRDC application on IDE. Any error is displayed on B4J ide. TEST 2 - Server runing jRDC.jar - Client runing on B4A ide / Debug(rapid) mode - Requests from client: * SELECT. All OK * UPDATE or INSERT. "java.net.SocketTimeoutException" error on Job.ErrorMessage. Connection to server do not crashes and SELECT requests only works.
Erel B4X founder Staff member Licensed User Longtime User Dec 16, 2015 #33 What do you see when the server crashes?
Bladimir Carrillo Member Licensed User Longtime User Dec 16, 2015 #34 No Erel said: What do you see when the server crashes? Click to expand... Any error nor any messaje
Erel B4X founder Staff member Licensed User Longtime User Dec 17, 2015 #35 You will need to use RDC for now.
A achtrade Active Member Licensed User Longtime User Jul 11, 2017 #36 do I have to install B4J in my computer to use jRDC ?
incendio Well-Known Member Licensed User Longtime User Jul 11, 2017 #37 achtrade said: do I have to install B4J in my computer to use jRDC ? Click to expand... No
Erel B4X founder Staff member Licensed User Longtime User Jul 11, 2017 #38 This thread is about the old version of jRDC. The latest version is jRDC2: https://www.b4x.com/search?query=jRDC2.
This thread is about the old version of jRDC. The latest version is jRDC2: https://www.b4x.com/search?query=jRDC2.