栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Tomcat 7中的Eclipse 4.2(Juno)“无法使用所选类型创建服务器”

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Tomcat 7中的Eclipse 4.2(Juno)“无法使用所选类型创建服务器”

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/tomcat7sudo ln -s /var/lib/tomcat7/conf confsudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policysudo ln -s /var/log/tomcat7 logsudo chmod -R 777 /usr/share/tomcat7/conf

3。重新启动服务器和Eclipse

4。添加新服务器

  • 在“服务器”类别下选择“服务器”;
  • 创建 新的服务器向导 ;
  • 选择 Apache / Tomcat v7.0 Server ,然后按下一步;
  • Tomcat安装目录中* 输入 / usr / share / tomcat7 ,然后按Next(下一步)。 *
  • 在“可用”下的左窗格中选择您的项目,然后按添加>将其移到“已 配置” 下的右窗格中。按 完成 ;

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/tomcat7sudo ln -s /var/lib/tomcat7/common commonsudo ln -s /var/lib/tomcat7/server serversudo ln -s /var/lib/tomcat7/shared shared


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/447352.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号