I've built a server using jServer to do some basic data housekeeping. I'm building client that needs offline capabilities so it has its own SQLite DB. I'm trying to download the data from a table on the server to a table on the client. When I test, I see in the console log that the request is being made but then the client errors. I'm getting the following error: "(FileNotFoundException) java.io.FileNotFoundException: C:\Users\<logged in user>\AppData\Local\Temp (Access is denied)"
This happens running the server in release and in debug.
On the Client, I am calling:
On the server side, I've stripped down the handler so it's just trying to send the data and I still get the access denied error:
I'm coding on a Windows 10 system, signed on user has full rights to the temp directory. What am I missing?
This happens running the server in release and in debug.
On the Client, I am calling:
Client Side:
Sub RequestData (jobname As String) As Object
'jobname is the data requested from the server such as GetDevices = Get list of all devices from server
Dim ser As B4XSerializator
Dim j As HttpJob
Dim t As Task
url = Settings.url
t.Initialize
t.TaskName = jobname
t.ToDo = Null
j.Initialize(jobname, Me)
j.PostBytes(url, ser.ConvertObjectToBytes(t))
Dim buffer(j.GetInputStream.BytesAvailable) As Byte
j.GetInputStream.ReadBytes(buffer, 0, buffer.Length)
Return ser.ConvertBytesToObject(buffer)
End Sub
On the server side, I've stripped down the handler so it's just trying to send the data and I still get the access denied error:
Server Side:
Sub Handle(req As ServletRequest, resp As ServletResponse)
Dim buffer(req.InputStream.BytesAvailable) As Byte
req.InputStream.ReadBytes(buffer, 0, buffer.Length)
Dim request As Task
request = serializator.ConvertBytesToObject(buffer)
Log("Request received")
If request.TaskName = ("GetDevices") Then
Dim bytes() As Byte = serializator.ConvertObjectToBytes(ProcessRequest(request))
resp.OutputStream.WriteBytes(bytes, 0,bytes.Length )
else if request.TaskName.StartsWith("Add") Then
End If
End Sub
I'm coding on a Windows 10 system, signed on user has full rights to the temp directory. What am I missing?