Hello,
I want add data from a jRDC2 Server to other jRDC2 Server. So I add DBRequestManager module into jRDC2 project
When I query from 1st jRDC2 server to other jRDC2 Server. It's working.
When I add data also. I use below code
data are not added into 2nd server's database. But in 1st server show below logs
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)
at java.io.DataInputStream.readByte(DataInputStream.java:265)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readByte(B4XSerializator.java:150)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:318)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:129)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertBytesToObject(B4XSerializator.java:99)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:110)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:1)
at anywheresoftware.b4a.BA$4.run(BA.java:292)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Error reading response: (EOFException) java.io.EOFException: Unexpected end of ZLIB input stream
How can I fix it?
Thanks.
I want add data from a jRDC2 Server to other jRDC2 Server. So I add DBRequestManager module into jRDC2 project
When I query from 1st jRDC2 server to other jRDC2 Server. It's working.
B4X:
Dim req As DBRequestManager = CreateRequest
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
Else
Dim res As DBResult = Null
Log($"Error executing query: ${j.ErrorMessage}"$)
End If
j.Release
Return res
When I add data also. I use below code
B4X:
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand
cmd = CreateCommand("add_stock", Array(Null, 10, "Item 101"))
Wait For (req.ExecuteBulk2(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
Log($"Success Size=${res.Rows.Size}"$)
Else
Log($"Error executing query: ${j.ErrorMessage}"$)
End If
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)
at java.io.DataInputStream.readByte(DataInputStream.java:265)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readByte(B4XSerializator.java:150)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:318)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:129)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertBytesToObject(B4XSerializator.java:99)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:110)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:1)
at anywheresoftware.b4a.BA$4.run(BA.java:292)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Error reading response: (EOFException) java.io.EOFException: Unexpected end of ZLIB input stream
How can I fix it?
Thanks.