Setup:
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?
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.
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.
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.
This is a known issue.To resolve this error, try one or all of the following:
Window–>Preferences–>Server–>Runtime Environments
and fix the broken path/link for the server.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
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.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With