B4J Question [SOLVED] CloudKVS_Client issue

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,
Please could you help me fixing that issue, just after having started ?

B4X:
Program started.
httputils2service._hc_responsesuccess (java line: 67)
java.io.FileNotFoundException: C:\Users\ann\AppData\Local\Temp\1 (Accès refusé)   <<<-- Access refused
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:371)
    at b4j.example.httputils2service._hc_responsesuccess(httputils2service.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA$3.run(BA.java:178)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    at java.lang.Thread.run(Thread.java:745)

I have tried to allow write access on the C:\Users\ann\AppData\Local\Temp\1 folder without success. In debug mode, it doesn't crash but doesn't show where the error occurs.
Windows 10 Pro x64, jdk 8u74, B4J 4.20

Many thanks
 
Last edited:

lemonisdead

Well-Known Member
Licensed User
Longtime User
Many thanks. I wonder why I can not write in that temp directory. Just tried to start B4J as admin with the same result

EDIT : Solved by changing the variable for the TEMP folder to point to a new folder (?)
 
Last edited:
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
Now I do have another "something else strange". Even if I change the client's package name, I get this in the logs
Class not found: b4j.cloudkvs.server.main$_item, trying: b4j.sample.main$_item but the server is not running on the machine and the code is just what was downloaded, only the IP was changed. Saved twice the project but no update
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Class not found: b4j.cloudkvs.server.main$_item, trying: b4j.sample.main$_item
This is expected and will always appear once for every type.

It happens because the serialized custom type package doesn't match. You should ignore it.

About the temp folder, you can change change the folder used by HttpUtils2 with:
B4X:
HttpUtils2Service.TempFolder = File.Combine(File.DirApp, "temp") 'make sure to first create this folder
 
Upvote 0
Top