B4J Question [Solved] It's not possible for httpjob to write to disk

schimanski

Well-Known Member
Licensed User
Longtime User
I don't understand the reason for this exception. I made a new app, but it is not possible for httpjob to write a temp-folder. I tried everything: I used app-folder, temp-folder and also setting the temp-folder to d:/ without success. The same httpjob and httputils2service -modules are working in another app.

I always got the message:

Class not found: b4j.example.customlistview, trying: de.sekutor.eisleader.customlistview

when starting the code. Could that be a reason for that?

B4X:
ehler in Zeile: 170 (HttpJob)
java.io.FileNotFoundException: C:\Users\stamm_000\AppData\Roaming\EIS-Leader\EIS\Temp\1 (Das System kann die angegebene Datei nicht finden)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:225)
    at de.sekutor.eisleader.httpjob._getstring2(httpjob.java:423)
    at de.sekutor.eisleader.httpjob._getstring(httpjob.java:129)
    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.shell.Shell.runMethod(Shell.java:613)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
    at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:19)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:135)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:84)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
    at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:482)
    at anywheresoftware.b4a.keywords.Common.access$0(Common.java:462)
    at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:536)
    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 tried also to update to the newest version of httpjob and httputils2service, but the same problem. Writing to the appdata-folder with writesting etc. works.
 

DonManfred

Expert
Licensed User
Longtime User
Class not found: b4j.example.customlistview, trying: de.sekutor.eisleader.customlistview
This has nothing to do with httputils.

In your app de.sekutor.eisleader.customlistview you are using a layout from the app b4j.example.customlistview

In your app de.sekutor.eisleader.customlistview do the following:
Open the layout, remove the clv, add it again, save the layout.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
when starting the code. Could that be a reason for that?
Looks like another issue. But without seeing your projectcode (upload a small example project which shoes the issue) it is hard to give any congrete advice.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Thank you very much!

@Don:
In your app de.sekutor.eisleader.customlistview do the following:
Open the layout, remove the clv, add it again, save the layout.

...that works.

Ups, i made a short project to demonstrate the exception and now, I found the problem: I've called job.release to early. Setting it to the end of the sub solves it. I'm an amateur...:confused:

Thanks for your efforts!
 
Upvote 0
Top