在目录C:\eclipse\配置\org.eclipse.osgi中不可能进行锁定

时间:2023-01-20 22:25:31

I used to have Eclipse 3.5.2 working from my Limited User Account (i.e. not Administrator).

我曾经让Eclipse 3.5.2使用我的有限用户帐户(即不是管理员)。

But when I upgraded to 3.6.2, Eclipse refuses to run in the Limited User Account (it only runs under administrator).

但是当我升级到3.6.2时,Eclipse拒绝在有限的用户帐户中运行(它只在管理员下运行)。

It issues the following error:

它发出以下错误:

Locking is not possible in the directory C:\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. C:\eclipse\configuration\org.eclipse.osgi.manager.fileTableLock (Access is denied)

在目录C:\eclipse\配置\org.eclipse.osgi中不可能进行锁定。一个常见的原因是文件系统或运行时环境不支持该位置的文件锁定。请选择不同的位置,或禁用文件锁定传递“-Dosgi”。锁定=none"作为VM参数。C:\ eclipse \ \ org.eclipse.osgi.manager配置。fileTableLock(访问被拒绝)

Well, I checked the owner of that folder (Windows XP) and it is the Administrator, so of course access would be denied.

嗯,我检查了那个文件夹的所有者(Windows XP),它是管理员,所以访问当然会被拒绝。

But... why didn't this happen in Eclipse 3.5.2?

但是…为什么在Eclipse 3.5.2中没有发生这种情况?

I could probably workaround this by assigning ownership of the entire C:\eclipse\configuration\org.eclipse.osgi but without understanding why, I don't know whether I would need to do that for additional folders.

我可以通过分配整个C:\eclipse\的配置\org.eclipse的所有权来解决这个问题。osgi,但是我不知道为什么,我不知道是否需要对其他文件夹这样做。

Another workaround is to do just as the error message suggests: Disable file locking passing -Dosgi.locking=none as a VM argument. But I don't what the tradeoff would be (locking is there for a reason, right? What is it?)

另一个解决方法是像错误消息建议的那样做:禁用文件锁定通过-Dosgi。锁定=无作为VM参数。但是我不知道权衡是什么(锁定是有原因的,对吧?这是什么?)

If I understand what the purpose of that locking is, I can wisely choose one of the 2 workarounds outlined above.

如果我理解锁的目的是什么,我可以明智地选择上面列出的两个解决方案中的一个。

12 个解决方案

#1


15  

This has to do with running Eclipse in a multi-user environment, first read this Eclipse help section on multi user installations. When Eclipse was installed, it was done so as an admin account. This meant that the configuration folder was accessible and Eclipse thought this was a shared configuration or private install. Because of this Eclipse will first try to write data to the configuration catalog, but will fail for normal users.

这与在多用户环境中运行Eclipse有关,请首先阅读关于多用户安装的Eclipse帮助部分。安装Eclipse时,它是作为一个管理帐户完成的。这意味着可以访问配置文件夹,Eclipse认为这是共享配置或私有安装。因为这次Eclipse将首先尝试将数据写入配置目录,但是对于普通用户来说将会失败。

What you want to do is to make Eclipse realize that you have a shared install installation and that all configuration data should be in the users home directory.

您要做的是让Eclipse意识到您有一个共享的安装,并且所有配置数据都应该位于用户主目录中。

See this similar question and this IBM support answer for more information.

有关更多信息,请参见这个类似的问题和IBM支持答案。

#2


14  

I had the same problem with the Juno version.

我对Juno版本也有同样的问题。

Several years ago I made a multiuser environment that worked perfectly, but the things changed with time. Now, my obvious solution, to change permissions, didn't work at all.

几年前,我创建了一个多用户环境,它工作得很好,但随着时间的推移,事情发生了变化。现在,我的明显的解决方案——更改权限——根本不起作用。

The issue is that the lock files have special permissions that the 777 won't change. Also, it is not the best solution just to provide the 777 to a directory inside any UNIX system (Linux, AIX, etc.); then, I worked around to another solution.

问题是,这些锁文件具有777不会更改的特殊权限。而且,这并不是最好的解决方案,只是将777提供给任何UNIX系统中的目录(Linux、AIX等);然后,我开始着手解决另一个问题。

Inside the Eclipse directory you can find a eclipse.ini file. There you can put the vm arguments, although the one suggested by Eclipse won't work.

在Eclipse目录中,您可以找到一个Eclipse。ini文件。在这里,您可以放置vm参数,尽管Eclipse建议的那个参数不起作用。

My environment started working with this one:

我的环境开始使用这个:

-Dosgi.configuration.area=@user.home/.eclipse

This way, each user inside the environment that run the Eclipse program, will create a different .eclipse directory inside the particular home, with full rights and zero problems.

这样,运行Eclipse程序的环境中的每个用户将在特定的home中创建一个不同的. Eclipse目录,其中包含完整的权限和零问题。

I expect this to be useful for everyone "in the UNIX side".

我希望这对“UNIX方面”的每个人都有用。

#3


8  

Proper fix

Make sure you update the permissions of Eclipse and the workspace to whatever user Eclipse runs as. You can use ps -ef | grep -i eclipse while eclipse is running to find that user. Once you have the user, you can easily use chown -R user:group ~/Documents/workspace**

确保将Eclipse和工作区的权限更新到Eclipse运行的任何用户。您可以在eclipse运行时使用ps -ef | grep -i eclipse来查找该用户。一旦有了用户,就可以轻松地使用chown -R用户:group ~/Documents/workspace*

Hacky fix

  1. Change permission of eclipse itself wherever you have it installed (in my case /opt/):

    在安装eclipse本身的任何地方更改eclipse本身的权限(在我的情况下/opt/):

    sudo chmod -R 770 /opt/eclipse

    sudo chmod - r770 /opt/eclipse

  2. Change permission of workspace wherever you have it located (in my case ~/Documents/):

    更改工作空间的权限(在我的情况下~/文件/):

    sudo chmod -R 770 ~/Documents/workspace

    sudo chmod - r770 ~/ document /workspace

Hope this helps my fellow Linux users!

希望这对我的Linux用户有帮助!

You can try this on windows with the proper syntax.

您可以在windows上使用适当的语法来尝试。

Thanks to Frederik for your help!

感谢弗雷德里克的帮助!

#4


4  

I wouldn't chmod to 777 to fix this problem. In my case the owner was root:root after a Rational Team Concert install for some RTC files and not my userid. Go to your user's home directory and ls -ltr to see what your userid and groupid are (on Ubuntu mine were both the same) and then execute the following on your eclipse subdirectory

我不会用chmod 777来解决这个问题。在我的例子中,在Rational Team Concert安装之后,所有者是root:root,而不是我的userid。进入用户的主目录和ls -ltr,查看用户id和groupid是什么(在Ubuntu mine上两者都是相同的),然后在eclipse子目录上执行以下操作

sudo chown -R myuserid:groupid /opt/ibm/eclipse

#5


3  

I had this problem when trying to create a workspace in a mapped network drive.

我在尝试在映射的网络驱动器中创建工作区时遇到了这个问题。

One option is to start Eclipse from terminal with ./eclipse -vmargs -Dosgi.locking=none.

一个选项是使用./ Eclipse -vmargs - dosgi . locked =none从终端启动Eclipse。

Another option is to add osgi.locking=none to the config.ini file in Eclilpse's configuration folder.

另一个选择是添加osgi。锁定=没有配置。在Eclilpse的配置文件夹中的ini文件。

The second option is more convenient, but has the side effect of allowing any number of Eclipse instances running the same workspace.

第二个选项更方便,但其副作用是允许任意数量的Eclipse实例运行相同的工作空间。

#6


2  

I simply added osgi.locking=none in the config.ini file, it started working. Thank you all for your help..

我只是添加了osgi。锁定=没有配置。ini文件,它开始工作了。谢谢大家的帮助。

#7


1  

Who has write access to the directory: C:\eclipse & C:\eclipse\configuration ?

谁拥有对目录的写访问:C:\eclipse & C:\eclipse\配置?

AFAIK eclipse decides, on startup, whether to use the central installation as the configuration location, or a user accessible directory based on whether the eclipse (or possibly the configuration) directory are writable.

AFAIK eclipse在启动时决定是使用*安装作为配置位置,还是根据eclipse(或者可能是配置)目录是否可写入而使用用户可访问目录。

#8


1  

simply copy and paste your eclipse folder to a folder in your currently logged in user space (in case you are having hard time finding one of the correct folders, just put it in C:\Documents and Settings\your_user_account_name) .And create a new workspace folder there only. Worked for me....!

简单的复制和粘贴您的eclipse文件夹的文件夹在你当前登录用户空间(以防你很难找到一个正确的文件夹,就把它放在C:\Documents and Settings\ your_user_account_name),创建一个新的工作区文件夹只有。为我工作.... !

#9


1  

Here is another reason why this message appears. It may seem an obvious thing to check, but if the read-only flag is set on the .fileTableLock file (this is in Windows, don't know about Linux) then you'll also get that Access Denied error. This arose because we were unzipping a pre-configured workspace and configuration into our users' IDE environments.

这是这个消息出现的另一个原因。检查似乎是一件显而易见的事情,但是如果在. filetablelock文件(这是在Windows中,不知道Linux)上设置了只读标志,那么您也将获得访问拒绝错误。之所以出现这种情况,是因为我们将预先配置的工作空间和配置解压缩到用户的IDE环境中。

#10


0  

I had a similar problem running on a server WITH an admin id.

我在一个具有管理id的服务器上运行时遇到了类似的问题。

Lowering UAC and rebooting the server fixed it.

降低UAC并重新引导服务器修复了它。

#11


0  

On Windows, the same error message occurred for me because I turned UAC back on after 2 years of having it off. I just deleted the . lock file eclipse complained about.. and pressed Continue when the UAC popup came.. and then re-opened eclipse.. all was well.

在Windows上,同样的错误信息出现在我身上,因为我在关闭UAC两年之后又重新打开了它。锁文件eclipse抱怨…当UAC弹出时,按下继续。然后重启eclipse . .一切都很好。

#12


0  

Well on windows, a simple work around for the same is to start Eclipse as an Administrator.

在windows上,一个简单的工作就是以管理员的身份启动Eclipse。

Right Click on Eclipse icon and click on Run as administrator.

右键单击Eclipse图标,然后单击Run as administrator。

It will solve your problem.

它会解决你的问题。

Enjoy :)

享受:)

#1


15  

This has to do with running Eclipse in a multi-user environment, first read this Eclipse help section on multi user installations. When Eclipse was installed, it was done so as an admin account. This meant that the configuration folder was accessible and Eclipse thought this was a shared configuration or private install. Because of this Eclipse will first try to write data to the configuration catalog, but will fail for normal users.

这与在多用户环境中运行Eclipse有关,请首先阅读关于多用户安装的Eclipse帮助部分。安装Eclipse时,它是作为一个管理帐户完成的。这意味着可以访问配置文件夹,Eclipse认为这是共享配置或私有安装。因为这次Eclipse将首先尝试将数据写入配置目录,但是对于普通用户来说将会失败。

What you want to do is to make Eclipse realize that you have a shared install installation and that all configuration data should be in the users home directory.

您要做的是让Eclipse意识到您有一个共享的安装,并且所有配置数据都应该位于用户主目录中。

See this similar question and this IBM support answer for more information.

有关更多信息,请参见这个类似的问题和IBM支持答案。

#2


14  

I had the same problem with the Juno version.

我对Juno版本也有同样的问题。

Several years ago I made a multiuser environment that worked perfectly, but the things changed with time. Now, my obvious solution, to change permissions, didn't work at all.

几年前,我创建了一个多用户环境,它工作得很好,但随着时间的推移,事情发生了变化。现在,我的明显的解决方案——更改权限——根本不起作用。

The issue is that the lock files have special permissions that the 777 won't change. Also, it is not the best solution just to provide the 777 to a directory inside any UNIX system (Linux, AIX, etc.); then, I worked around to another solution.

问题是,这些锁文件具有777不会更改的特殊权限。而且,这并不是最好的解决方案,只是将777提供给任何UNIX系统中的目录(Linux、AIX等);然后,我开始着手解决另一个问题。

Inside the Eclipse directory you can find a eclipse.ini file. There you can put the vm arguments, although the one suggested by Eclipse won't work.

在Eclipse目录中,您可以找到一个Eclipse。ini文件。在这里,您可以放置vm参数,尽管Eclipse建议的那个参数不起作用。

My environment started working with this one:

我的环境开始使用这个:

-Dosgi.configuration.area=@user.home/.eclipse

This way, each user inside the environment that run the Eclipse program, will create a different .eclipse directory inside the particular home, with full rights and zero problems.

这样,运行Eclipse程序的环境中的每个用户将在特定的home中创建一个不同的. Eclipse目录,其中包含完整的权限和零问题。

I expect this to be useful for everyone "in the UNIX side".

我希望这对“UNIX方面”的每个人都有用。

#3


8  

Proper fix

Make sure you update the permissions of Eclipse and the workspace to whatever user Eclipse runs as. You can use ps -ef | grep -i eclipse while eclipse is running to find that user. Once you have the user, you can easily use chown -R user:group ~/Documents/workspace**

确保将Eclipse和工作区的权限更新到Eclipse运行的任何用户。您可以在eclipse运行时使用ps -ef | grep -i eclipse来查找该用户。一旦有了用户,就可以轻松地使用chown -R用户:group ~/Documents/workspace*

Hacky fix

  1. Change permission of eclipse itself wherever you have it installed (in my case /opt/):

    在安装eclipse本身的任何地方更改eclipse本身的权限(在我的情况下/opt/):

    sudo chmod -R 770 /opt/eclipse

    sudo chmod - r770 /opt/eclipse

  2. Change permission of workspace wherever you have it located (in my case ~/Documents/):

    更改工作空间的权限(在我的情况下~/文件/):

    sudo chmod -R 770 ~/Documents/workspace

    sudo chmod - r770 ~/ document /workspace

Hope this helps my fellow Linux users!

希望这对我的Linux用户有帮助!

You can try this on windows with the proper syntax.

您可以在windows上使用适当的语法来尝试。

Thanks to Frederik for your help!

感谢弗雷德里克的帮助!

#4


4  

I wouldn't chmod to 777 to fix this problem. In my case the owner was root:root after a Rational Team Concert install for some RTC files and not my userid. Go to your user's home directory and ls -ltr to see what your userid and groupid are (on Ubuntu mine were both the same) and then execute the following on your eclipse subdirectory

我不会用chmod 777来解决这个问题。在我的例子中,在Rational Team Concert安装之后,所有者是root:root,而不是我的userid。进入用户的主目录和ls -ltr,查看用户id和groupid是什么(在Ubuntu mine上两者都是相同的),然后在eclipse子目录上执行以下操作

sudo chown -R myuserid:groupid /opt/ibm/eclipse

#5


3  

I had this problem when trying to create a workspace in a mapped network drive.

我在尝试在映射的网络驱动器中创建工作区时遇到了这个问题。

One option is to start Eclipse from terminal with ./eclipse -vmargs -Dosgi.locking=none.

一个选项是使用./ Eclipse -vmargs - dosgi . locked =none从终端启动Eclipse。

Another option is to add osgi.locking=none to the config.ini file in Eclilpse's configuration folder.

另一个选择是添加osgi。锁定=没有配置。在Eclilpse的配置文件夹中的ini文件。

The second option is more convenient, but has the side effect of allowing any number of Eclipse instances running the same workspace.

第二个选项更方便,但其副作用是允许任意数量的Eclipse实例运行相同的工作空间。

#6


2  

I simply added osgi.locking=none in the config.ini file, it started working. Thank you all for your help..

我只是添加了osgi。锁定=没有配置。ini文件,它开始工作了。谢谢大家的帮助。

#7


1  

Who has write access to the directory: C:\eclipse & C:\eclipse\configuration ?

谁拥有对目录的写访问:C:\eclipse & C:\eclipse\配置?

AFAIK eclipse decides, on startup, whether to use the central installation as the configuration location, or a user accessible directory based on whether the eclipse (or possibly the configuration) directory are writable.

AFAIK eclipse在启动时决定是使用*安装作为配置位置,还是根据eclipse(或者可能是配置)目录是否可写入而使用用户可访问目录。

#8


1  

simply copy and paste your eclipse folder to a folder in your currently logged in user space (in case you are having hard time finding one of the correct folders, just put it in C:\Documents and Settings\your_user_account_name) .And create a new workspace folder there only. Worked for me....!

简单的复制和粘贴您的eclipse文件夹的文件夹在你当前登录用户空间(以防你很难找到一个正确的文件夹,就把它放在C:\Documents and Settings\ your_user_account_name),创建一个新的工作区文件夹只有。为我工作.... !

#9


1  

Here is another reason why this message appears. It may seem an obvious thing to check, but if the read-only flag is set on the .fileTableLock file (this is in Windows, don't know about Linux) then you'll also get that Access Denied error. This arose because we were unzipping a pre-configured workspace and configuration into our users' IDE environments.

这是这个消息出现的另一个原因。检查似乎是一件显而易见的事情,但是如果在. filetablelock文件(这是在Windows中,不知道Linux)上设置了只读标志,那么您也将获得访问拒绝错误。之所以出现这种情况,是因为我们将预先配置的工作空间和配置解压缩到用户的IDE环境中。

#10


0  

I had a similar problem running on a server WITH an admin id.

我在一个具有管理id的服务器上运行时遇到了类似的问题。

Lowering UAC and rebooting the server fixed it.

降低UAC并重新引导服务器修复了它。

#11


0  

On Windows, the same error message occurred for me because I turned UAC back on after 2 years of having it off. I just deleted the . lock file eclipse complained about.. and pressed Continue when the UAC popup came.. and then re-opened eclipse.. all was well.

在Windows上,同样的错误信息出现在我身上,因为我在关闭UAC两年之后又重新打开了它。锁文件eclipse抱怨…当UAC弹出时,按下继续。然后重启eclipse . .一切都很好。

#12


0  

Well on windows, a simple work around for the same is to start Eclipse as an Administrator.

在windows上,一个简单的工作就是以管理员的身份启动Eclipse。

Right Click on Eclipse icon and click on Run as administrator.

右键单击Eclipse图标,然后单击Run as administrator。

It will solve your problem.

它会解决你的问题。

Enjoy :)

享受:)