-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0, 1.4.1, 1.4.2, 5.0
-
b40
-
x86, sparc
-
linux, linux_redhat_3.0, solaris_8
-
Verified
Build: Tiger beta b26
Platform: Redhat Advanced Server 3.0 (x86)
Tests:
java_util/prefs/Preferences/SJvm2Thread/userRoot/KeysTest2SJvm2Thread
and 15 other related tests.
In Redhat Linux AS 3.0, java.util.prefs.BackingStoreException is thrown when Preferences.removeNode() is called. The following piece of code illustrates it.
----------------------------Test.java-----------------------------
import java.util.prefs.*;
public class Test
{
public static void main(String[] args)
{
Preferences userRoot = null;
Preferences N1 = null;
try
{
userRoot = Preferences.userRoot();
N1 = userRoot.node("N1");
N1.clear();
N1.removeNode();
} catch (Exception e)
{
System.out.println("Exception caught:"+ e.getMessage());
}
}
}
------------------------------------------------------------------------
the following is the output
------------------------------------------------------------------------
Oct 31, 2003 2:37:51 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock User prefs. Unix error code 22.
Exception caught:Couldn't get file lock.
java.util.prefs.BackingStoreException: Couldn't get file lock.
at java.util.prefs.FileSystemPreferences.removeNode(FileSystemPreferences.java:657)
at Test.main(Test.java:29)
------------------------------------------------------------------------
The above code is run on the local system (not on a nfs file system).
The above problem is not observed with mantis.
###@###.### 2003-10-31
Platform: Redhat Advanced Server 3.0 (x86)
Tests:
java_util/prefs/Preferences/SJvm2Thread/userRoot/KeysTest2SJvm2Thread
and 15 other related tests.
In Redhat Linux AS 3.0, java.util.prefs.BackingStoreException is thrown when Preferences.removeNode() is called. The following piece of code illustrates it.
----------------------------Test.java-----------------------------
import java.util.prefs.*;
public class Test
{
public static void main(String[] args)
{
Preferences userRoot = null;
Preferences N1 = null;
try
{
userRoot = Preferences.userRoot();
N1 = userRoot.node("N1");
N1.clear();
N1.removeNode();
} catch (Exception e)
{
System.out.println("Exception caught:"+ e.getMessage());
}
}
}
------------------------------------------------------------------------
the following is the output
------------------------------------------------------------------------
Oct 31, 2003 2:37:51 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock User prefs. Unix error code 22.
Exception caught:Couldn't get file lock.
java.util.prefs.BackingStoreException: Couldn't get file lock.
at java.util.prefs.FileSystemPreferences.removeNode(FileSystemPreferences.java:657)
at Test.main(Test.java:29)
------------------------------------------------------------------------
The above code is run on the local system (not on a nfs file system).
The above problem is not observed with mantis.
###@###.### 2003-10-31
- duplicates
-
JDK-4673298 (prefs) Locking in Preferences sometimes fails on NFS mounted drives (Linux)
-
- Closed
-
- relates to
-
JDK-4762735 (prefs) BackingStoreException thrown when preferences dir nfs share
-
- Open
-