Closed echu79 closed 10 years ago
Internal ticket has been filed. It will be fixed in the next release.
I'm not sure if proposed fix is the way to go. Normaly path to JAR in local file system is resolved as "file:/c:/path/to/jar" and is handled correctly: new File(new URI("file:/c:/path/to/jar")) will not throw an exception. However, if the path for some reason has two slashes, e.g. "file://c:/path/to/jar" mentioned exception is thrown. The problem, is that passing this string to Paths.get(uri).toFile() will not throw an exception, but will resolve the path incorrectly, returning "\c\path\to\jar" which cannot be resolved to a file. So it looks like the only way we can deal with this issue is to follow the blog post you mentioned (http://www.tomergabel.com/JavaMishandlesUNCPathsOnWindows.aspx).
The issue is resolved. See commit https://github.com/gridgain/gridgain/commit/b5e814b9f69faa2521e86fb3da82f28fb1b3d23c
In GridUtils.resolveProjectHome() it throws the following exception when the jar/class files are located on a UNC path in Windows:
This seems to be a long standing issue with Java and UNC paths on windows. If you are only supported Java 7+, it can be fixed by changing the following around line 2476 in GridUtils.java
to
If supporting < Java 7, there are a number of workarounds floating around the net. http://wiki.eclipse.org/Eclipse/UNC_Paths http://www.tomergabel.com/JavaMishandlesUNCPathsOnWindows.aspx
Thanks!