users@glassfish.java.net

Re: power pc + open jdk + glassfish

From: <forums_at_java.net>
Date: Tue, 10 May 2011 20:33:30 -0500 (CDT)

 I have googled and found the following.

I fogot to mention that I also use NFS.

 

Locking a NFS mounted file throws IOException in Solaris 
Posted: Feb 4, 2010 9:33 PM  
 
Reply [1] Problem Description:
------------------------------------------------------------------------------
When mounted files are tried to lock, it throws the following exception
java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.lock0(Native Method)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:842)

Code snippet to reproduce the problem:
Private static RandomAccessFile raLicFile;
File f = new File(licfile);
raLicFile = new RandomAccessFile(f, "r");
FileCannel fChannel = raLicFile.getChannel();
LicenseTextDataSource.lock = fChannel.lock(0L,Long.MAX_VALUE,true); //This
throws IOException

Reproducing the problem:

------------------------------------------------------------------------------
This problem is reproducible in only Solaris machine.
but again not in all versions of Solaris. 
Two machines should be used to reproduce the problem say A and B. In m/c A
the file which needs to be locked and the test application is stored. This
folder is mounted on another machine B and the test application is launched
in B.
Please let me know whether this is an issue in Solaris machine and any
specific version of Solaris.
Currently we are able to reproduce when both the machines are Solaris 5.10.
Jre used : 1.5
 


[1] http://forums.oracle.com/forums/post!reply.jspa?messageID=8207353

--
[Message sent by forum member 'daniil_k']
View Post: http://forums.java.net/node/800908