I wrote a test client for some jRDC2 testing in B4J non-gui mode. I then had a batch file start as many sessions of that client for me. I'm attaching source for both the client and the batch file and hopefully it gives some inspiration. Please note that this client was adapted for a heavily modified jRDC2 server that I was using to test various SQL pooling options (H2, HSQLDB, Hikari, Tomcat, Vibur, and 3CP0) and pooling/JDBC properties. I was also testing various DB engines (H2, Apachy Derby, SQLite, HSQLDB, and MySQL). I'll throw in the config.properties file so you can find the SQL statement that was used for testing. It's not a canned project for you, but it may help you (hopefully) in your endeavors.
One of the things I was curious about when I build this jRDC2 server is to see if SQLite is really that bad when it comes to concurrency. Well, it's not and it actually beat the pants of all the other solutions. When it came to pooling, I really did not see huge differences in the various pooling options. The pool size seemed to be optimal between 8-10. Anything above that did not improve anything (in my limited testing). The nice thing about H2, Apache Derby, SQLite and HSQLDB is that they are embedded DB's that really need no administrating. SQLite is fast, memory efficient, but type (SQL types) poor. H2 (successor to HSQLDB?) is very type rich, is not much slower, but is a memory hog compared to SQLite. MySQL requires a separate server daemon (locally or remote) but is actually relatively memory efficient (in comparison to H2). Pooling is definitely required when using MySQL on a remote server (with pool sizes between 8-10 being optimal). I'll dig for some data tomorrow and post some of it. Please note that the data is very specific to my testing and your test environment may discover something else. I could post the jRDC2 server, but it's a tad rough. It's functional, but not 100% finished. You can see the options that were allowed to be tweaked in the config file that I posted above.
I wrote a test client for some jRDC2 testing in B4J non-gui mode. I then had a batch file start as many sessions of that client for me. I'm attaching source for both the client and the batch file and hopefully it gives some inspiration. Please note that this client was adapted for a heavily modified jRDC2 server that I was using to test various SQL pooling options (H2, HSQLDB, Hikari, Tomcat, Vibur, and 3CP0) and pooling/JDBC properties. I was also testing various DB engines (H2, Apachy Derby, SQLite, HSQLDB, and MySQL). I'll throw in the config.properties file so you can find the SQL statement that was used for testing. It's not a canned project for you, but it may help you (hopefully) in your endeavors.
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\User1\AppData\Local\Temp\465 (The process cannot access the file because it is being used by another process)
ERROR: StartMessageLoop aborted!!!! Exception: java.io.FileNotFoundException: C:\Users\User1\AppData\Local\Temp\465 (The process cannot access the file because it is being used by another process)
java.lang.RuntimeException: java.util.zip.ZipException: invalid distance too far back
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:297)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:357)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:112)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertBytesToObject(B4XSerializator.java:82)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:93)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:1)
at anywheresoftware.b4a.BA$4.run(BA.java:272)
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:748)
Caused by: java.util.zip.ZipException: invalid distance too far back
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readFully(DataInputStream.java:169)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:327)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:231)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:347)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:231)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:275)
... 11 more
[HandleJobAsync] Error reading response: (ZipException) java.util.zip.ZipException: invalid distance too far back
[GetQuestions] ERROR: java.lang.NullPointerException
java.lang.RuntimeException: java.lang.RuntimeException: Unsupported type: 52
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:297)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:357)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:112)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertBytesToObject(B4XSerializator.java:82)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:93)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator$2.call(B4XSerializator.java:1)
at anywheresoftware.b4a.BA$4.run(BA.java:272)
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:748)
Caused by: java.lang.RuntimeException: Unsupported type: 52
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:359)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:231)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:347)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:231)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:275)
... 11 more
[HandleJobAsync] Error reading response: (RuntimeException) java.lang.RuntimeException: Unsupported type: 52
I had the same issues with this as you. My guess was that so many http jobs were running that one was assigned the same random file name as another. So once one job was finished, it deleted the file, bombing out the other http job. I was going to make a question post out of this one, but never got to it. It only happened when I had lots of http jobs running (therefore my guess).java.io.FileNotFoundException: C:\Users\User1\AppData\Local\Temp\465
That's a new one for me. Looks like that's thrown by B4XSerializator as it encounters a type it does not understand. May be worth a new thread too. For both cases (this and above) would need to create some minimal system that can reproduce the issues (else it will be hard for anyone else to look at it).java.lang.RuntimeException: Unsupported type: 52
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?