Eclipse 3.7 (Indigo) + Tomcat7 --- Cannot create a server using the selected type
Asked Answered
S

10

70

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?

Solubility answered 6/11, 2011 at 7:54 Comment(3)
And #447789 didn't helped?Vulpecula
You should accept the answer below as the advice in it fixes your problem.Yet
Did this issue happen after removing Server?Insane
P
135

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.
Psychological answered 6/11, 2011 at 9:11 Comment(6)
what if i cannot found org.eclipse.jst.server.tomcat.core.prefs and org.eclipse.wst.server.core.prefs under\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings ?Scutum
Renaming the files .bak won't work. You need to either rename in a different way, move away or delete them.Susceptible
Using the method 1 Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the server. works. The strange thing is that once you have added a path that's not correct anymore, even if you remove the relevant Server Runtime Environment, you will not be able to select the relevant Server in the new server wizard, you MUST fix that path before doing so.Insane
Thank you so much. I am tired to death of damned Eclipse's issues. It seems that it has got nothing but issues. It's a crap.Stoma
I have deleted tomcat7 in Window–>Preferences–>Server–>Runtime Environments and this don't helped. Then I removed rm ./org.eclipse.platform_3.8_155965261/plugins/org.eclipse.jst.server.tomcat.core_1.1.301.v20111010_1242.jar and rm ./org.eclipse.platform_3.8_155965261/plugins/org.eclipse.jst.server.tomcat.ui_1.1.200.v20100418.jar and seems now I can't see tomcat in list at new server creation, so something get broken.Prosciutto
Even uninstalling and installing Eclipse Java EE Developer Tools, Eclipse Java Web Developer Tools, Eclipse Web Developer Tools, JST Server Adapters bring me back to step I have deleted tomcat7 in Window–>Preferences–>Server–>Runtime EnvironmentsProsciutto
I
3

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.

Ion answered 16/11, 2012 at 13:13 Comment(0)
H
1

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.

Hairsplitting answered 22/12, 2013 at 6:33 Comment(0)
G
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.
Gens answered 3/8, 2015 at 12:59 Comment(0)
A
0

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.

Amaris answered 5/10, 2012 at 18:24 Comment(1)
That is pretty interesting. This seems to happen about once per month, so I'll try that next time!Amaris
M
0

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.

Moneyer answered 6/11, 2012 at 5:57 Comment(1)
I guess this should be commentCohobate
C
0

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.

Chirk answered 2/6, 2013 at 2:28 Comment(0)
G
0

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

Guerrero answered 5/2, 2015 at 9:21 Comment(0)
M
0

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.

Menstrual answered 17/2, 2016 at 11:26 Comment(0)
S
-1

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.

Susceptible answered 19/3, 2013 at 16:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.