Eclipse 3.7 (Indigo) + Tomcat7 — Cannot create a s

2019-01-13 01:52发布

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?

10条回答
The star\"
2楼-- · 2019-01-13 02:30

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.
查看更多
爷的心禁止访问
3楼-- · 2019-01-13 02:31

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.

查看更多
Root(大扎)
4楼-- · 2019-01-13 02:31

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.

查看更多
干净又极端
5楼-- · 2019-01-13 02:33

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.

查看更多
看我几分像从前
6楼-- · 2019-01-13 02:39

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.

查看更多
叼着烟拽天下
7楼-- · 2019-01-13 02:40

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.

查看更多
登录 后发表回答