Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2010-02-19 22:23:28 +0000
committerThomas Watson2010-02-19 22:23:28 +0000
commitb4f7c1756a7880a1f5dafd18f362a3c3e5b56ae0 (patch)
tree043a52073d159beef6fe20d0641f49767822e7df /bundles/org.eclipse.osgi/defaultAdaptor
parent5c339be3bf9b33e79407137143ea1e717cb1ddf4 (diff)
downloadrt.equinox.framework-b4f7c1756a7880a1f5dafd18f362a3c3e5b56ae0.tar.gz
rt.equinox.framework-b4f7c1756a7880a1f5dafd18f362a3c3e5b56ae0.tar.xz
rt.equinox.framework-b4f7c1756a7880a1f5dafd18f362a3c3e5b56ae0.zip
Bug 303071 - The framework should fail to launch if the storage area (configuration) cannot be locked
Diffstat (limited to 'bundles/org.eclipse.osgi/defaultAdaptor')
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
index 4a4bcf9c2..46962b2c8 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
@@ -207,7 +207,7 @@ public class BaseStorage implements SynchronousBundleListener {
StateManager.DEBUG_PLATFORM_ADMIN_RESOLVER = options.getBooleanOption(OPTION_PLATFORM_ADMIN_RESOLVER, false);
}
- protected StorageManager initFileManager(File baseDir, String lockMode, boolean readOnly) {
+ protected StorageManager initFileManager(File baseDir, String lockMode, boolean readOnly) throws IOException {
StorageManager sManager = new StorageManager(baseDir, lockMode, readOnly);
try {
sManager.open(!readOnly);
@@ -219,6 +219,12 @@ public class BaseStorage implements SynchronousBundleListener {
String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FILEMANAGER_OPEN_ERROR, ex.getMessage());
FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, ex, null);
adaptor.getFrameworkLog().log(logEntry);
+ FrameworkProperties.setProperty(EclipseStarter.PROP_EXITCODE, "15"); //$NON-NLS-1$
+ FrameworkProperties.setProperty(EclipseStarter.PROP_EXITDATA, "<title>Invalid Configuration Location</title>Locking in directory '" + baseDir + //$NON-NLS-1$
+ "' is not possible. A common reason is that the file system or Runtime Environment does not support file locking for that location. " + //$NON-NLS-1$
+ "Please choose a different location, or disable file locking passing \"-Dosgi.locking=none\" as a VM argument.\n" + //$NON-NLS-1$
+ ex.getMessage());
+ throw ex;
}
return sManager;
}

Back to the top