Loading jars as symlinks
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi,
We have a very strange problem with loading jars (which are symlinks).
We are loading about 20 jars inside a certain directory and all are ok, except 1 sometimes (x.jar)
Lets say the files are inside /opt/shared/lib and ls /opt/shared/lib shows:
a.jar -> /opt/a/a.jar
b.jar -> /opt/b/b.jar
c.jar -> /opt/c/c.jar
d.jar -> /opt/d/d.jar
x.jar -> /opt/x/x.jar
For some reason loading x always gives the exception:
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /opt/x/x.jar read)
When we look at /opt/x/x.jar, the permissions are fine. Now comes the strange part.
After some tries we ended up with (d.jar was obsolete):
a.jar -> /opt/a/a.jar
b.jar -> /opt/b/b.jar
c.jar -> /opt/c/c.jar
x.jar -> /opt/x/x.jar
and everything works as expected.
Then we:
1. remove the symlink x.jar
2. add a new (dummy) file to this directory
3. make the symlink again
4. remove the dummy file
Now the problem occurs again and we get the above io.FilePermission exception.
Now if we:
1. remove the symlink
2. make the symlink again
The exception is gone, it seems as if the symlinks takes the physical place of the dummy file on the filesystem.
Redoing the above sequences gives again the FilePermission exception and finally OK again.
Some background info, the OS is Solaris 10 (sparc) using UFS filesystem. JDK used is 1.5.0_06 but have tested it using 1.6.0_18 with same results.
We have a very strange problem with loading jars (which are symlinks).
We are loading about 20 jars inside a certain directory and all are ok, except 1 sometimes (x.jar)
Lets say the files are inside /opt/shared/lib and ls /opt/shared/lib shows:
a.jar -> /opt/a/a.jar
b.jar -> /opt/b/b.jar
c.jar -> /opt/c/c.jar
d.jar -> /opt/d/d.jar
x.jar -> /opt/x/x.jar
For some reason loading x always gives the exception:
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /opt/x/x.jar read)
When we look at /opt/x/x.jar, the permissions are fine. Now comes the strange part.
After some tries we ended up with (d.jar was obsolete):
a.jar -> /opt/a/a.jar
b.jar -> /opt/b/b.jar
c.jar -> /opt/c/c.jar
x.jar -> /opt/x/x.jar
and everything works as expected.
Then we:
1. remove the symlink x.jar
2. add a new (dummy) file to this directory
3. make the symlink again
4. remove the dummy file
Now the problem occurs again and we get the above io.FilePermission exception.
Now if we:
1. remove the symlink
2. make the symlink again
The exception is gone, it seems as if the symlinks takes the physical place of the dummy file on the filesystem.
Redoing the above sequences gives again the FilePermission exception and finally OK again.
Some background info, the OS is Solaris 10 (sparc) using UFS filesystem. JDK used is 1.5.0_06 but have tested it using 1.6.0_18 with same results.
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Welcome to the JavaRanch.
This really isn't an IO question. I'm going to move it to our Unix forum. Good luck!
This really isn't an IO question. I'm going to move it to our Unix forum. Good luck!
Sander Hamel
Greenhorn
Posts: 3
posted 15 years ago
Hi Joe,
Thanks for moving my topic.
Actually I do believe that this issue is Java releated as the OS has no problem with these files whatsoever.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Joe Ess wrote:Welcome to the JavaRanch.
This really isn't an IO question. I'm going to move it to our Unix forum. Good luck!
Hi Joe,
Thanks for moving my topic.
Actually I do believe that this issue is Java releated as the OS has no problem with these files whatsoever.
posted 15 years ago
I wasn't disagreeing with you. I just moved your question out of our IO forum, which deals with the Java IO classes, to our Unix forum, which deals with OS-specific issues.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sander Hamel wrote:Actually I do believe that this issue is Java releated as the OS has no problem with these files whatsoever.
I wasn't disagreeing with you. I just moved your question out of our IO forum, which deals with the Java IO classes, to our Unix forum, which deals with OS-specific issues.
Sander Hamel
Greenhorn
Posts: 3
posted 15 years ago
Ok sorry for misunderstanding, I'm still new here :-).
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Joe Ess wrote:
Sander Hamel wrote:Actually I do believe that this issue is Java releated as the OS has no problem with these files whatsoever.
I wasn't disagreeing with you. I just moved your question out of our IO forum, which deals with the Java IO classes, to our Unix forum, which deals with OS-specific issues.
Ok sorry for misunderstanding, I'm still new here :-).
| Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |











