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

Status
Not open for further replies.

kris A

Member
Licensed User
Longtime User
I am handling large amount of data from the server. Does jrdc2 handle compression?
 

kris A

Member
Licensed User
Longtime User
Any additional libraries or commands to use the B4XSerializator compression or is this automatically handled by the jdrc2?
 

kris A

Member
Licensed User
Longtime User
After Upgrade DBRequestManager.bas v2, My server got error :



My client B4a got error :

java.util.zip.ZipException: Not in GZIP format
Error: Server Error

My Server :
windows 10
JDK 1.8.0
driver mysql : mysql-connector-java-5.1.27-bin
 

IlCasti

Active Member
Licensed User
Longtime User
How about unknow method?

Dim method As String = req.GetParameter("method") is empty..

srvr.AddHandler("/rdc", "RDCHandler", False)

this from web request "http://localhost:3307/rdc"

laptop is in a private domain in a lan and in a private wireless connection

any idea?

thanks
 
Last edited:

Scotter

Active Member
Licensed User

Hi -
Sorry if this is a newb question:
If I'm running B4A 6.50, how much of this stuff do I already have?
Thanks!
 

jorgesegura

Member
Licensed User
Longtime User
I am trying to run ExecuteQuery.
But I get this error cannot serialize object
Server side

Error occurs this line in B4J
Dim data() As Byte = ser.ConvertObjectToBytes(res)
 

Attachments

  • 1.png
    64.1 KB · Views: 575

schalkgreyling

Member
Licensed User
Longtime User
Hi guys,

I'm busy migrating my jRDC to a command line linux system. I can connect to the database (mysql on linux) from my Windows pc with jRDC but when I run the .jar on the linux system and executes a query I get the following:

2017-03-28 19:38:56.600:INFO::main: Logging initialized @344ms
2017-03-28 19:39:01.968:INFOejs.Server:main: jetty-9.3.z-SNAPSHOT
2017-03-28 19:39:02.025:INFOejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@2892dae4{/,file:///home/klasie/www,AVAILABLE}
2017-03-28 19:39:02.028:INFOejs.AbstractNCSARequestLog:main: Opened /home/klasie/logs/b4j-2017_03_28.request.log
2017-03-28 19:39:02.041:INFOejs.ServerConnector:main: Started ServerConnector@31275903{HTTP/1.1,[http/1.1]}{0.0.0.0:17178}
2017-03-28 19:39:02.042:INFOejs.Server:main: Started @5787ms
jRDC is running (version = 2.1)

(TimeoutException) com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@79acf084 -- timeout at awaitAvailable()
(CannotAcquireResourceException) com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
(TimeoutException) com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@79acf084 -- timeout at awaitAvailable()
(CannotAcquireResourceException) com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.

Command: , took: 5966ms, client=192.168.1.211
Command: , took: 21232ms, client=192.168.1.211

I'm suspecting it's got to do with the mysql-driver but i'm not too familiar with linux so i'm not sure where to start/what is required to run the jar. When I run the same .jar on windows after the "Command:" i see the login command being posted. But not on the Linux system.

Any help would be appreciated.

Regards,
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Yes, it should be the same I as the root server...
In my case I was using my web domain name and working ok
 

Alexander Stolte

Expert
Licensed User
Longtime User
Hello, what i do wrong?

B4X:
Sub btn_registy_Click
    Dim cmd As DBCommand
    cmd.Initialize
    cmd.Name = "registry"
    cmd.Parameters = Array As Object(txb_username.Text, txb_email.Text , txb_password.text, "1")
    reqManager.ExecuteQuery(cmd, 0, Null) 'NULL
End Sub

Sub JobDone(Job As HttpJob)
    If Job.Success = False Then
        Log("Error: " & Job.ErrorMessage)
    Else
        If Job.JobName = "DBRequest" Then
            reqManager.HandleJobAsync(Job, "ReqManager")
        End If
    End If
    Job.Release
End Sub

Sub ReqManager_Result(result As DBResult)
    reqManager.PrintTable(result)
End Sub

this ends in a Error:
B4X:
(SQLServerException) com.microsoft.sqlserver.jdbc.SQLServerException: Es wurde kein Resultset von der Anweisung zurückgegeben
in english: no resultset is response

on my config File:
B4X:
sql.registry=INSERT INTO Users (username, email, password, user_ID) VALUES (?,?,?,?

what i have forgott?
 

Cableguy

Expert
Licensed User
Longtime User
You are inserting values, not retrieving them, so no record set is returned...
Try "SELECT FROM"
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…