B4J Library [B4X] jRDC2 - B4J implementation of RDC (Remote Database Connector)

Status
Not open for further replies.

Dey

Active Member
Licensed User
Longtime User
Hello to all
I have a big doubt
I use DBRequestManager in most instances simultaneously?
therefore you may be running example of starter in a timer and other classes?
it does on
Type DBResult (Tag As Object, As Map Columns, Rows As List)
Type DbCommand (Name As String, Parameters () As Object)
which they are declared in one instance
You can modify an instance for data error?
I hope I was clear
Thank you
 

alan dodd

Member
Licensed User
Longtime User
Hi Erel, I am using successfully RDC on > 30 android devices to query (write/read) remote mysql server via wifi
I would like to be able to write/read to same mysql server also from several arduinos with wifi or ethernet shield. Do you think it would be possible / and easy to port?
 

achtrade

Active Member
Licensed User
Longtime User
I am running multiple B4J webservers now. If you want I can create a detailed tutorial. are you running B4J server in a VPS?

Best,
SK
Please, I detailed tutorial should be great.

I'll wait for it

Thanks
 

achtrade

Active Member
Licensed User
Longtime User
It is up to you. For new projects it is recommended to use jRDC2.
I would like to use this new jRDC2, but I'm developing with B4A, I don't know if this is an issue.

I couldn't start my server with this:

B4X:
nohup path_to_java/bin/java -jar somejar.jar > nohup.out &

What I don't understand is the "somejar.jar" part
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I would like to use this new jRDC2, but I'm developing with B4A, I don't know if this is an issue.
Go over the tutorial in the first post.

You need to compile jRDC2 with B4J (run it in release mode) and it will create a jar file under the Objects folder. The jar file is the compiled application.
 

Dey

Active Member
Licensed User
Longtime User
a greeting to all
I saw that there are updates to
sqlite-jdbc-3.7.2.jar
example
sqlite-jdbc-3.8.7.jar
it is advisable to switch to this?
Thank you
 

IlCasti

Active Member
Licensed User
Longtime User
Hi there
I worked with RDC "first version" in the past. All works perfectly.
Yesterday i started to use new version (jRDC2) Nothing worked until now. Not properly.
I can reach server status connection:
RemoteServer is running (09/06/2016 12:21:15)
Connection successful.
What does it mean?

HTTP ERROR: 500

Problem accessing /rdc. Reason:
unknown method
Powered by Jetty:// 9.3.z-SNAPSHOT

I can't connect to db
This is the b4a line error from log: Error: org.apache.http.conn.ConnectTimeoutException: Connect to /192.168.43.28:3307 timed out
I use the same file .properties "shared" from old and new RDC
How can understand where i'm wrong?
Thank you.

PS: i use my laptop as server and development with mysql and my lg4 with usb cable connection in debug mode
 

marcick

Well-Known Member
Licensed User
Longtime User
Did you modify the url sintax ? I remember there is a small difference and you need to add something after the port number
 

IlCasti

Active Member
Licensed User
Longtime User
Did you modify the url sintax ? I remember there is a small difference and you need to add something after the port number

You mean in b4a project?
Something like /RDC? If so, i tried, but same result..
 

marcick

Well-Known Member
Licensed User
Longtime User
Yes, /rdc
I don't remember if there are other differences but well reading the tutorial I didn't have any particular problem moving to jrdc2 ... Sorry I can't help more
 

IlCasti

Active Member
Licensed User
Longtime User
Yes, /rdc
I don't remember if there are other differences but well reading the tutorial I didn't have any particular problem moving to jrdc2 ... Sorry I can't help more

It works well now.. it's case sensitive.. stupid me.. thank you!
 

incendio

Well-Known Member
Licensed User
Longtime User
When running with DBRequestManager on a non ui app, got an error :

main._appstart (java line: 93)
java.lang.RuntimeException: java.lang.IllegalStateException: Toolkit not initial
ized
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.objects.Timer$TickTack$1.run(Timer.java:118)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(Simple
MessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131
)
at b4j.example.main._appstart(main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.main(main.java:29)
Caused by: java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:27
3)
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:26
8)
at javafx.application.Platform.runLater(Platform.java:83)
at anywheresoftware.b4j.objects.FxBA.postRunnable(FxBA.java:17)
at anywheresoftware.b4a.keywords.Common.CallSubDelayed4(Common.java:500)

at anywheresoftware.b4a.keywords.Common.CallSubDelayed2(Common.java:484)

at b4j.example.httpjob._postbytes(httpjob.java:215)
at b4j.example.dbrequestmanager._vv6(dbrequestmanager.java:203)
at b4j.example.dbrequestmanager._vv1(dbrequestmanager.java:71)
at b4j.example.main._v6(main.java:234)
at b4j.example.main._tm_tick(main.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
... 12 more
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…