我已经安装了:
当我尝试在Eclipse中添加新服务器Tomcat7时,收到此消息
“无法使用所选类型创建服务器”
我无法继续。添加Tomcat6服务器没问题。
1。要解决错误 “无法使用所选类型创建服务器”,请 运行以下命令:
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。一旦执行此操作,另一个错误
‘无法在/ usr / share / tomcat7 / conf中加载Tomcat服务器配置。 配置可能已损坏或不完整/usr/share/tomcat7/conf/catalina.policy(无此类文件或目录)’
因此,要解决此问题,请运行以下命令:
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。重新启动服务器和Eclipse
4。添加新服务器
Eclipse需要启动服务器,并且要做到这一点,首先,它必须停止在后台运行的服务器。
sudo服务tomcat7停止
如果您不必在启动时自动启动,我们可以使用以下命令
sudo update-rc.d tomcat7禁用
如果在服务器启动期间收到以下警告:
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]
您可能还需要运行以下命令:
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