Eclipse 3.7(靛蓝)+ Tomcat7 --- 无法使用所选类型创建服务器

发布于 2024-12-14 05:05:25 字数 263 浏览 0 评论 0原文

设置:

  • 中的 WEB 工具
  • Eclipse 3.7 + indigo 更新站点Tomcat7
  • Ubuntu

问题:

当我尝试在 Eclipse 的服务器透视图中添加新的 Tomcat 7 服务器时,出现以下错误:

"Cannot create a server using the selected type" 

如何解决此问题?

Setup:

  • Eclipse 3.7 + the WEB tools from the indigo update site
  • Tomcat7
  • Ubuntu

Problem:

When I try to add a new Tomcat 7 server in the server perspective in Eclipse I get the following error:

"Cannot create a server using the selected type" 

How do I solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

木緿 2024-12-21 05:05:25

这是一个已知问题。要解决此错误,请尝试以下一项或全部操作:

  1. 转至 Window–>Preferences–>Server–>Runtime Environments 并修复损坏的路径/链接服务器。
  2. 将 org.eclipse.jst.server.tomcat.core.prefs 重命名为 org.eclipse.jst.server.tomcat.core.prefs.bak (或者您可以删除该文件)。该文件可以在 \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings 中找到
  3. 重命名 org.eclipse.wst.server.core.prefs code> 到 org.eclipse.wst.server.core.prefs.bak (或删除该文件)。该文件也可以在与上述相同的位置找到。

This is a known issue.To resolve this error, try one or all of the following:

  1. Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the server.
  2. Rename the org.eclipse.jst.server.tomcat.core.prefs to org.eclipse.jst.server.tomcat.core.prefs.bak (or you can delete this file). This file can be found at \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings
  3. Rename the org.eclipse.wst.server.core.prefs to org.eclipse.wst.server.core.prefs.bak (or delete the file). This file also can be found at the same location as above.
狼性发作 2024-12-21 05:05:25

对我有用的同一问题的不同解决方案。我在这里分享它可能对某人有帮助。

我有
- 日食朱诺
- 雄猫7
- Windows 7

这就是我所做的

Eclipse >窗口>首选项>安装了 JRE,我在此处添加并选择了 jre7。所以我通过按“添加”按钮添加了 jre6(如果未安装或者您运行了 java 更新,只需下载并安装 jre6)。并选择jre6而不是jre7。

现在转到 Eclipse >窗口>首选项>服务器>运行环境>按“添加”并添加 Tomcat 7。

现在就完成了。

A different resolution of the same problem that worked for me. I share it here it might be helpful for someone.

I have
- Eclipse Juno
- Tomcat 7
- Windows 7

This is what I did

Eclipse > Window > Preferences > Installed JREs and I've got jre7 added and selected here. So I added jre6 by pressing Add button(If not installed or you ran a java update, just download and install jre6). And select jre6 instead of jre7.

Now go to Eclipse > Window > Preferences > Server > Runtime Environment > Press Add and add Tomcat 7.

You're done now.

动听の歌 2024-12-21 05:05:25

在尝试了 aleroot 的解决方案但没有成功之后,VonC 对这个问题的评论为我解决了这个问题。因此,如果您有以下问题,请按照此处建议的解决方案进行操作撞墙了。请记住随后从运行时环境中删除旧的 Tomcat 配置。

After trying aleroot's solution without success, VonC's comment on the question was what fixed it for me. So follow the solution suggested here if you hit a wall. Remember to remove the old Tomcat configuration from Runtime Environments afterwards.

小ぇ时光︴ 2024-12-21 05:05:25

我在服务器的运行时配置选项卡中添加了两个 tomcat 7 运行时配置。删除了重复的并修复了我的系统中安装在 C:\Program Files\Apache Software Foundation\Tomcat 7.0 下的唯一 tomcat 7 的路径,这解决了我在中添加新服务器的问题服务器选项卡。

  1. 转到窗口 > 首选项 > 服务器> 运行时环境并通过单击编辑更新服务器运行时环境路径以更改服务器的损坏路径。

I had two tomcat 7 runtime configurations added to my Server's Runtime configurations tab. Deleted the duplicate one and fixed the path to the only tomcat 7 which was installed in my system under C:\Program Files\Apache Software Foundation\Tomcat 7.0 and this solved my problem of adding a new server in the servers tab.

  1. Go to Window > Preferences > Server > Runtime Environments and update the server runtime environment path to change the broken path for the server by clicking Edit.
零度° 2024-12-21 05:05:25

上述解决方案都不适合我。列出的文件都不存在于该位置或我的计算机上的其他任何位置。我尝试备份 .settings 文件夹中的所有文件并重新启动 Eclipse,但仍然遇到相同的错误。

唯一有效的方法是重新安装 Tomcat。

Neither of the above solutions worked for me. Neither of the files listed exist in that location or anywhere else on my machine. I tried backing up all the files in the .settings folder and restarting Eclipse, but still got the same error.

The only thing that worked was to reinstall Tomcat.

终弃我 2024-12-21 05:05:25

该错误是由于服务器在其他 Java(TM) 平台上运行而导致的。

  1. 启动任务管理器->进程->选择Java(TM)
  2. 单击“结束进程”。

完成此过程后,您可以添加服务器,不会出现任何错误。

The error occurs due to the server running in some other Java(TM) Platform.

  1. Start Task manager->Processes->Select Java(TM)
  2. Click "End Processes".

After finishing this procedure you can add the server without any error.

孤独陪着我 2024-12-21 05:05:25

我删除了上面提到的文件...仍然没有运气。一时兴起,我决定下载并安装 NetBeans。我在短短几分钟内就启动并运行了 Postgres DB 和 Apache 服务器等!无需额外下载等。

无论如何,切换到 Netbeans 对我来说很有效。再见日食。

I removed the files mentioned above...still no luck. On a whim, I decided to download and install NetBeans. I was up and running with Postgres DB and Apache server running, etc. in just a few minutes! No extra downloads, etc.

Anyway, switching to Netbeans is what worked for me. Goodbye Eclipse.

波浪屿的海角声 2024-12-21 05:05:25

另一种方法是删除服务器目录(如果已创建)。这对我有用。

Another way is to remove the Servers directory if was already created. That worked for me.

花期渐远 2024-12-21 05:05:25

在尝试了其他答案中提到的所有工作步骤之后,即使不起作用,

更改 eclipse、工作区和 tomcat 目录。 [仅针对 Windows7 进行测试]

我知道有人可能会说这是不正确的,但上述步骤对我有用。

我花了4个小时才找到这个蛮力法的解决方案。

After trying all the working steps mentioned in the others answers, and even if did not work then,

Change eclipse, workspace and tomcat directory. [tested only for Windows7]

I know somebody might say that is not correct, but above step did work for me.

It took me 4 hours to find this brute force method solution.

殊姿 2024-12-21 05:05:25

如果您在 Debian/Ubuntu 系统中使用 apt-get 安装了 Tomcat 7,则解决此问题的最干净的解决方案是将运行 Eclipse 的用户分配给 tomcat7 组

例如,如果该用户的用户名是 pippo 那么您只需运行:

sudo adduser pippo tomcat7

注意:您需要注销并重新登录才能使更改生效。

If you have installed Tomcat 7 with apt-get in a Debian/Ubuntu system, the cleanest solution to this problem is to assign the user under which Eclipse is running to the tomcat7 group.

If for example that user's username is pippo then you just need to run:

sudo adduser pippo tomcat7

Note: you need to log out and log back in for the changes to take effect.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文