Hello,
i'm having issues with running multiple jnlps. In an application we use, 2 jnlp files are called. During the startup process, OWS generates an Error.
In the log file both are accessing cache.json at the same time and thus creating this error. I also had the same issue with deployment.properties. I think this applies to all files which will be edited and saved.
We did look into this and think the issue could be here
https://github.com/karakun/OpenWebStart ... nager.java
/**
* Load runtimes from filesystem into cache. Do some housekeeping by checking if a runtime is still present
* on the file system as stated in the cache json file. If not present any more, it will be removed from the
* json file and the cache.
*/
private void saveRuntimes() throws IOException {
jsonStoreLock.lock();
try {
[...]
}
final File jsonFile = new File(cachePath, RuntimeManagerConstants.JSON_STORE_FILENAME);
if (jsonFile.exists()) {
if (!jsonFile.delete()) { <- A second process can't delete the file, since it's locked
throw new IOException("Unable to delete old config file!");
}
}
[...]
} finally {
jsonStoreLock.unlock();
}
}
Regards,
Andrej
Unable to delete old config file
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Unable to delete old config file
Hi Andrej,
>
i'm having issues with running multiple jnlps. In an application we use, 2 jnlp files are called. During the startup process,
>
Can you please elaborate above? What do you mean by running multiple jnlps? How do you run them? Are these extension jnlps? You say two jnlps are called. How are you doing this. Please provide more details.
Thanks
>
i'm having issues with running multiple jnlps. In an application we use, 2 jnlp files are called. During the startup process,
>
Can you please elaborate above? What do you mean by running multiple jnlps? How do you run them? Are these extension jnlps? You say two jnlps are called. How are you doing this. Please provide more details.
Thanks
Re: Unable to delete old config file
Hi Janak,
in Microsoft Windows I have associated jnlp to open with OWS. ("C:\Program Files\OpenWebStart\javaws.exe" -nosecurity -Xnofork -Xignoreheaders -allowredirect -jnlp "%1"). Optional Parameters don't matter, issue also happens with "-jnlp" only. It is a WebApplication running in Firefox. It is based on JavaServerFaces, which after login Downloads immediately JNLP files from the backendmiddleware Server and then opens them via Firefox/Windows on the client machine. It's basically the same as opening the JNLP files in Windows Explorer. Mark both and press "Enter". In Firefox they are downloaded to your temp and executed via default firefox/windows "open". If futher information is required I will try to get them.
Regards,
Andrej
in Microsoft Windows I have associated jnlp to open with OWS. ("C:\Program Files\OpenWebStart\javaws.exe" -nosecurity -Xnofork -Xignoreheaders -allowredirect -jnlp "%1"). Optional Parameters don't matter, issue also happens with "-jnlp" only. It is a WebApplication running in Firefox. It is based on JavaServerFaces, which after login Downloads immediately JNLP files from the backendmiddleware Server and then opens them via Firefox/Windows on the client machine. It's basically the same as opening the JNLP files in Windows Explorer. Mark both and press "Enter". In Firefox they are downloaded to your temp and executed via default firefox/windows "open". If futher information is required I will try to get them.
Regards,
Andrej
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Unable to delete old config file
Thanks Andrej.
So basically it is like starting two instances of OWS's javaws simultaneously. I will try this and get back to you.
So basically it is like starting two instances of OWS's javaws simultaneously. I will try this and get back to you.
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Unable to delete old config file
I tried running two jnlps simultaneously but I could not reproduce it. There seems to be a timing issue. But we will review the code pointed out by you.
Are you getting this Exception always, consistently whenever you run your JSF application? What happens if you introduce a slight delay between downloads of jnlps in your application? does it work that way?
Are you getting this Exception always, consistently whenever you run your JSF application? What happens if you introduce a slight delay between downloads of jnlps in your application? does it work that way?
Re: Unable to delete old config file
Always after reboot, on the first start. Otherwise sporadically. Via windows explorer (mark and enter) I can reproduce always. With delay it is working. So yes it looks like a timing issue.
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Unable to delete old config file
We have created an issue. It will be fixed in future release.
Re: Unable to delete old config file
Thank you very much!
Do you know in which version this will be presumably fixed ?
Do you know in which version this will be presumably fixed ?
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Unable to delete old config file
We will fix this in v1.3.0.