Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse 3.7 (Indigo) + Tomcat7 --- 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?

like image 722
user1031946 Avatar asked Nov 06 '11 07:11

user1031946


People also ask

How can I add Tomcat server to eclipse?

For configuring the tomcat server in eclipse IDE, click on servers tab at the bottom side of the IDE -> right click on blank area -> New -> Servers -> choose tomcat then its version -> next -> click on Browse button -> select the apache tomcat root folder previous to bin -> next -> addAll -> Finish.

Where is Tomcat server XML in Eclipse?

In {workspace}/Servers you will find a folder for every Tomcat configuration, containing several configuration files, including the server. xml. There you then can edit the file directly.

How do I open Tomcat in Eclipse?

Go to the project in the Project Explorer, select the web project, right click and select "Run As", you will see Apache Tomcat, create runtime configuration for the web project by selecting "New" button.


2 Answers

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.
like image 69
aleroot Avatar answered Oct 09 '22 21:10

aleroot


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.

like image 44
Ali Avatar answered Oct 09 '22 23:10

Ali