Seite 1 von 1

sbt test: AccessDeniedException

Verfasst: 21. Nov 2016 21:25
von Faxe

I'm having issues with the FileSerializierTest as it fails due an AccessDeniedException. I use java.nio.file to write to a File, but I assume I somehow messed it up.

Before writing to a file a check if it exists and create a file otherwise. However, the creation fails due to the aforementiond Exception if repeatedly called (as done in the tests), therefore messing up the test.

Code: Alles auswählen

Does anyone has a clue on how to fix this problem?

Best Regards

Re: sbt test: AccessDeniedException

Verfasst: 22. Nov 2016 16:30
von vkuhn
If you're trying to write into a non-existing directory, you'd first have to create it with

Code: Alles auswählen

If that doesn't help, running as Admin seems to help some people (on Windows).
Unfortunately, that didn't help me either. For me

Code: Alles auswählen

din't work everytime, but

Code: Alles auswählen

did work, though I'm not quite sure why that is.