Closed mgreau closed 9 years ago
I don't know what is your opinion but I think this is a bug of maybe JVM or in your system. Look that javadoc of java.nio.file.Files.createDirectories
:
Creates a directory by creating all nonexistent parent directories first. Unlike the createDirectory method, an exception is not thrown if the directory could not be created because it already exists.
Throws:
FileAlreadyExistsException - if dir exists but is not a directory (optional specific exception)
So in my mind comes next possibilities: the first one a bug on JVM and the second one that in your computer there is a file called tmp
in root that it is not a directory.
Don't know if you have any other idea.
@mgreau You running boot2docker on Ubuntu? or Mac/Windows?
boot2docker on Mac
I will try it as well but watching the javadoc of the method it doesn't seems that it is something related with boot2docker
Ok I think that I found the problem. It seems that boot2docker creates a symbolic link named tmp :
ls -al /
lrwxr-xr-x@ 1 root wheel 11 16 nov 13:44 tmp -> private/tmp
drwxr-xr-x@ 11 root wheel 374 16 nov 13:54 usr
lrwxr-xr-x@ 1 root wheel 11 16 nov 13:45 var -> private/var
If I rename tmp to tmp2, boot2docker doesn't start so my /tmp example is not a good idea :)
We could make a more controlled check there;
if file.exists() && file.isFile() throw IllegalArgumentException("some detailed reason why")
We should probably verify this up front and fail before everything runs.. (tho the state might have changed since we checked it in Before so we should check again to fail controlled right before we try to do it :))
hehe right then let's do what Aslak mention for avoiding this problem I only thought about alraedy existing directories but not that a directory could be a file. Ok I am going to fix it :)
Thank you both of you.
The same applies to copy from log
The same arquillian.xml configuration works for Ubuntu but fails with boot2docker. The arquillian.xml configuration is below :
In order to reproduce the problem :
The error log :