Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362648 - Error "The configuration area ... not writable" at start Eclipse 3.6.0
Summary: Error "The configuration area ... not writable" at start Eclipse 3.6.0
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: Juno M4   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 06:15 EDT by macwaney CLA
Modified: 2011-11-04 15:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description macwaney CLA 2011-11-02 06:15:18 EDT
Build Identifier: I20100608-0911

Attempts to start the testing tool in v8.2.X result in error  " ... choose a writable location using the '-configuration'  .

ERROR MESSAGE

The error message opens immediately, even before the workspace dialog box. 

An example of the full error message is as follows. Note the trailing space in the path.
 
The configuration area at 'G:\IBM\RFT\eclipse\conf ' is not writable.
Please choose a writable location using the '-configuration' command
line option.

The value of osgi.configuration.area from config.ini contains a trailing space. Eclipse 3.5 does not have this issue. 

RATLC02574293


Reproducible: Always

Steps to Reproduce:
1.Add the following line to [<code>]<install dir>\configuration\config.ini[</code>] with a trailing space.

osgi.configuration.area=F\:\\IBM\\RFT\\eclipse\\conf  

Where F: is  the user's home drive.


2. Start Eclipse
Comment 1 John Arthorne CLA 2011-11-02 11:46:20 EDT
Not sure if it is framework or launcher reading this. We should be able to just trim() the input.
Comment 2 Thomas Watson CLA 2011-11-02 13:30:08 EDT
(In reply to comment #1)
> Not sure if it is framework or launcher reading this. We should be able to just
> trim() the input.

Is there ever valid a case where the folder would really have a leading or trailing space?  Or is that simply a degenerate case and we should be lenient on the input and assume the configuration really did not intend to include the leading/trailing spaces?
Comment 3 John Arthorne CLA 2011-11-03 15:49:26 EDT
Trailing whitespace is technically legal in Unix filenames, and illegal in Windows. On Unix it is common if you actually want a trailing whitespace you need to surround with quotes, something like:

osgi.configuration.area="/home/foo/file with space "

Another option is using something like java.io.File#getCanonicalFile() which will cause the whitespace to be discarded on platforms where it is not valid.
Comment 4 John Arthorne CLA 2011-11-04 10:39:13 EDT
I suggest we just trim the input on windows and leave it alone elsewhere. It is arguably not a bug on other platforms where trailing spaces are legal.
Comment 5 Thomas Watson CLA 2011-11-04 13:46:02 EDT
I think we would need to do the adjustments to the inputs in the methods org.eclipse.equinox.launcher.Main.buildURL(String, boolean) and org.eclipse.core.runtime.internal.adaptor.LocationHelper.buildURL(String, boolean)