B4J Question Testing jRDC2 with oracle

Bladimir Carrillo

Member
Licensed User
Longtime User
Hello all,

I am testing my application to change from RDC to jRDC2.

Test #1 on first Activity
Action:

ExecuteQuery (SELECT statement)

A. Client side in Debug mode

Results:
a. With MsSQL and MySQL works well
b. With Oracle, I have an error in the DBRequestManager module, Sub ser_BytesToObject, on the following line:

B4X:
res.Tag = m.Get("tag")

Error:
Error reading response: (EOFException) java.io.EOFException
Error occurred on line: 83 (DBRequestManager)
java.lang.NullPointerException
at anywheresoftware.b4a.shell.Shell.setField(Shell.java:613)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:349)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:244)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:132)
at anywheresoftware.b4a.BA$3.run(BA.java:334)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5099)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:570)
at dalvik.system.NativeStart.main(Native Method)

The error occurs several miliseconds after ending JobDone Sub with Job.Success = true.

B. Client side in Release mode

Results:
a. With MsSQL and MySQL works well
b. With oracle, I have an error (attached image) on the device:



Test #2 on second Activity with MsSQL

* Test #1 on first activity works fine, that is JobDone and ReqManager_Result subs completed successfull.

Action:
ExecuteQuery (SELECT statement), same as excecuted on first activity.

A. Client side in Debug mode

Results:

JobDone sub completed, but ReqManager_Result sub never begins.


In advance, thank you for any assistance.
 

Bladimir Carrillo

Member
Licensed User
Longtime User
Lets start with the first issue. Are you monitoring the B4J server for any errors?

Based on this line: Error reading response: (EOFException) java.io.EOFException, the response was invalid.

Yes,
Running de jRDC2 jar file (generated in release mode) and running in B4J ide, no errors appears.
 
Upvote 0

Bladimir Carrillo

Member
Licensed User
Longtime User
Run your app in debug mode and check the logs. It should print the server response.

Server logs:
res: 789C5D915F4F833014C5A957C79CCE7F53637CF2C1E78507BF005048889419A8C6B7A664C4600A3376CB8C9FDEB6D085F9D2F4FEEE39BDA7ED1DBA771CA77CFA9C573FBCF912D5BCE175FBC896E5772537627DA8BA68AA9644266DBDAEB9A87FABA58B102846F987835CB5095762D3B4F27AA6D523ADC68CE0546B76350D5240BA3E524B465880E1C0B655A9DB5A8F269D3C4EB19F2D9EC10418771AC340FBD1F18E243883D17FE483BBEFC3058C2D794BFB93B4C3E4EFE63398D87C095EE4184EAC43E579C9894A733A2061162B321D90E89D2A7236B874802338DF9F12C185B550C2123FA4115C5A1287ECD5902B4DF4DDF3D556DEE877BB9DD97005F13CCF4C28D489A5E8C773A6B067FF8BF25270F950D492F8A1B1797DDBF903DD6D4BC7
Error reading response: (EOFException) java.io.EOFException
Error occurred on line: 86 (DBRequestManager)
java.lang.NullPointerException
at net.sismac.sts.dbrequestmanager._ser_bytestoobject(dbrequestmanager.java:419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:697)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:336)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA$2.run(BA.java:328)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5099)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:570)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **

line 86:
res.Tag = m.Get("tag")
 
Upvote 0

KingKing

Member
Licensed User
Longtime User
Hi All,

I believe I also has the same error in B4A when testing RDC2. However I am testing on PostgreSQL 9.3 in Windows 7 (32bit)
I select 3 fields from a table without parameter and it pop up the error. I have the checked the SQL statement and it returns data. No null data is return.

Appreatiate if anybody can assist me to fix this error. Thank you.
Below are B4A and B4J log file.

I have added this code to HandleJobAsync, just before calling ser.ConvertBytesToObjectAsync(data, "ser")

B4X:
    Dim bc As ByteConverter
Log("res: " & bc.HexFromBytes(data))

B4A Client Log:



B4J Log :
 
Last edited:
Upvote 0

KingKing

Member
Licensed User
Longtime User
same error happen. the error occur at line 61 Dim res As DBResult = ser.ConvertBytesToObject(data) in HandleJob.

 
Upvote 0

KingKing

Member
Licensed User
Longtime User
I did a few more testing by modifying the SQL select statement in config.properties in B4J.
I found out that if the SQL select statement is select from a numeric field, then it will hit the above error. If i cast the numeric field to text, it will NOT hit the error. Conclusion, can not select from numeric field in postgres database.

Now my question is whether JRDC2 support numeric data type in B4J or not?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…