2

When I first installed Eclipse 4.3 (Kepler) it ran A-Okay. I even did a Java program.

When I shut down Eclipse and ran it again later, I got the error message below. Thinking I did something wrong on the install, I uninstalled it and removed all traces of Eclipse. Then I reinstalled it, ran Eclipse and all was great.

It ran normally for a couple days. Then I shut down the computer and restarted it a few hours later. Eclipse gave that same error message again, the Invalid Configuration Location error. So something goes awry after the initial running of Eclipse and prevents further executions of the program.

This error message is generated when I run Eclipse (Kepler) in Kubuntu 13.10. It shows up right after the Eclipse splash screen disappears:

**Invalid Configuration Location**
Locking is not possible in the directory "/opt/eclipse/configuration/org.eclipse.osgi". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing "-Dosgi.locking=none" as a VM argument. 
Permission denied

So I did the disabling suggestion and put it right after the vmargs line. Here's the current ini file for Eclipse 4.3 (Kepler)

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.locking=none
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m

But still I get the same identical message. The arg -Dosgi.locking=none is working as evidenced by the fact that the log file in the Configuration folder no longer mentions file locking as a problem. Here is what I get now in the Configuration log, the latest:

!SESSION 2013-11-22 22:25:06.162 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.osgi 4 0 2013-11-22 22:25:14.821
!MESSAGE Error reading configuration: Permission denied
!STACK 0
java.io.IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1006)
    at java.io.File.createTempFile(File.java:1989)
    at org.eclipse.osgi.storagemanager.StorageManager.initializeInstanceFile(StorageManager.java:188)
    at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:708)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:226)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:160)
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:263)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

!ENTRY org.eclipse.osgi 4 0 2013-11-22 22:25:14.869
!MESSAGE Startup error
!STACK 1
java.lang.RuntimeException: Permission denied
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:194)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:263)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.io.IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1006)
    at java.io.File.createTempFile(File.java:1989)
    at org.eclipse.osgi.storagemanager.StorageManager.initializeInstanceFile(StorageManager.java:188)
    at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:708)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:226)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:160)
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
    ... 10 more

So, the one remaining option is to move the Configuration. Or maybe use -vm to specify a path or maybe pass an arg to the vm ?

I used the guide to do the install of Eclipse located at: http://tutorialforlinux.com/2013/09/27/how-to-install-eclipse-ide-for-java-developers-ubuntu-13-04-raring13-10-saucy/

What's likely to work?

6
  • How did you installed Eclipse?
    – Braiam
    Nov 22, 2013 at 19:29
  • I edited my original submission with that info. Dean
    – user218375
    Nov 23, 2013 at 11:25
  • 1. Download Latest Eclipse for Java Linux 2. Extract Eclipse into /tmp 3. Open Terminal Window 4. sudo su 5. mv /tmp/eclipse /opt 6. ln -s /opt/eclipse/eclipse /usr/bin/eclipse 7. eclipse
    – user218375
    Nov 25, 2013 at 16:05
  • The execution of Eclipse will work until the program is shut down and then restarted. That is the strange part. But having to re-install eclipse every time you want to use it is dreary work.
    – user218375
    Nov 25, 2013 at 16:19
  • I found if I start eclipse in the terminal with the -clean argument that it will start up and run, until I shut it down. On a fast computer this could be a good workaround: eclipse -clean
    – user218375
    Nov 28, 2013 at 14:59

1 Answer 1

0

In my case the problem was solved by changing the owner of the files in question, it was root for some reason. This changes the owner of org.eclipse.osgi directory and all it's children to the owner of config.ini:

/opt/eclipse.4.3.2/configuration$ chown -R --reference config.ini org*

If this doesn't help try also adding the write permission:

/opt/eclipse.4.3.2/configuration$ chmod +w org*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .