I have installed:
When I try to add a new server Tomcat7, in Eclipse, I get this message
'Cannot create a server using the selected type'
and I can not continue. No problem adding Tomcat6 server.
I read this question but it didn't solve it for me
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.
To configure Tomcat as a new Runtime Environment, select the "Preferences" menu item from Eclipse's "Windows" menu (if you are using a Mac, you can find "Preferences" under the main Eclipse menu). You will be presented with large tree of preferences. Expand the "Server" preferences, and select "Runtime Environments".
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.
Follow the steps below to change the default deploy directory of Tomcat in Eclipse. Select “use custom location” radio button in the “Server Locations” section and set your custom deploy path.
1 . To fix the error 'Cannot create a server using the selected type' run the following:
cd ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/ rm org.eclipse.jst.server.tomcat.core.prefs rm org.eclipse.wst.server.core.prefs
2 . Once you do this, another error
'Could not load the Tomcat server configuration at /usr/share/tomcat7/conf. The configuration may be corrupt or incomplete /usr/share/tomcat7/conf/catalina.policy (No such file or directory)'
So to fix this run the following commands:
cd /usr/share/tomcat7 sudo ln -s /var/lib/tomcat7/conf conf sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy sudo ln -s /var/log/tomcat7 log sudo chmod -R 777 /usr/share/tomcat7/conf
3 . Restart server and Eclipse
4 . Add new server
Eclipse need to start the server, and to do that, first, it has to stop the one running in background.
sudo service tomcat7 stop
If you don't have to automatically start at boot, we can use the following command
sudo update-rc.d tomcat7 disable
If, during server start, you receive warnings like:
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false] WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false] WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false] WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false] WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false] WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
You may also need to run the following:
cd /usr/share/tomcat7 sudo ln -s /var/lib/tomcat7/common common sudo ln -s /var/lib/tomcat7/server server sudo ln -s /var/lib/tomcat7/shared shared
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