|
From: Sean M. <sea...@ba...> - 2006-02-10 21:15:11
|
I've run into an odd situation and I was wondering if anybody had any suggestions? I'm using Java Service Wrapper 3.1.2 on Mac OS X 10.4.4 (not OS X Server) running Java 1.4.2_09. I've got an app wrapped using WrapperSimpleApp as per the Integration Methods instructions Since I'm on a Mac the script and wrapper file live in /Library/StartupItems/<appname>. With a bit of wrapper.working.dir trickery I've got wrapper running my jar which lives in /Library/MediaSpan/<appname>, which has uid:guid of appserver:admin, as does my jar and its lib folder. My app subclasses java.rmi.server.UnicastRemoteObject to make it configurable via RMI. It stores its configuration via java.util.prefs.Preferences, using the node returned by Preferences.userNodeForPackage(<myclass>.class). No call is ever made to Preferences.systemNodeForPackage(). When I *do not* RUN_AS_USER, the WrapperSimpleApp wrapper starts my app, and it runs just fine. I can connect via RMI and set my app's configuration, which writes to the Preferences user node via the putXXX and flush methods in Preferences. The Preferences calls all work fine. The trouble comes when I try to RUN_AS_USER=appserver. When I make that one change everything works like before *except* the Preferences.flush call, which throws a BackingStoreException: java.util.prefs.BackingStoreException: Synchronization failed for node <myclass's user node> I'm confused as to why this is happening for the RUN_AS_USER case, but not when wrapper runs my app as root... has anybody else had to deal with this? I searched the java-dev mailing list at Apple but the only mention of BackingStoreException puts the blame on making flush calls on a system pref node returned by Preferences. systemNodeForPackage. Sean |