Hi @Marko_K ,
If you are trying to delete a directory using a java service, and it fails, please check if you can try a java standalone program to do the same. This looks a permissions issue, and some other process could have a lock on the directory.
Also, you can check the Server->Logs->Error Log → Expand stacktrace to see, if there is a detailed log of the reason why this failed.
Another consideration – the user being used to attempt to delete the directory simply does not have permission to do so. The error message is very clear – AccessDeniedException.
Looks like you’re using UNC notation to delete from a Windows share. I’m assuming the JVM hosting Integration Server is also on a Windows machine. The “run as” user of the JVM would need permission to delete that folder.
The problem was that WM server was not started through services with the proper user which has the right to that folder. When started with proper user, everything works as expected.