The BackingStoreException probably appears because the www-data user
doesn't have a home directory, or it isn't writable. Java apparently
need this for storing preferences.
You can override it and use a different directory with a JVM-option:
-Djava.util.prefs.userRoot=/some/writable/directory
On Mon, Aug 27, 2012 at 1:46 PM, <forums_at_java.net> wrote:
> I have suddenly ran into the same problem. Glassfish can be started with
> sudo
> -u www-data /mnt/persist/glassfishv3/bin/asadmin --secure start-domain
> domain1 but not stopped with sudo -u www-data
> /mnt/persist/glassfishv3/bin/asadmin --secure stop-domain domain1 Also, I
> can
> no longer deploy webapps. server.log says:
> [#|2012-08-27T13:50:45.803+0200|WARNING|glassfish3.1.2|java.util.prefs|_ThreadID=23;_ThreadName=Thread-2;|Could
> not lock User prefs. Unix error code 2.|#]
> [#|2012-08-27T13:50:45.804+0200|WARNING|glassfish3.1.2|java.util.prefs|_ThreadID=23;_ThreadName=Thread-2;|Couldn't
> flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file
> lock.|#] What's going on?
>
> --
>
> [Message sent by forum member 'tmpsa']
>
> View Post: http://forums.java.net/node/889274
>
>