【太神奇了,真的可以呀】

原文:http://stackoverflow.com/questions/13423593/eclipse-4-2-juno-cannot-create-a-server-using-the-selected-type-in-tomcat-7

133down voteaccepted

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

  • Choose the Servers under the Server category;
  • Create new server wizard;
  • Choose Apache / Tomcat v7.0 Server and press Next;
  • Enter /usr/share/tomcat7 into the Tomcat installation directory and press Next;
  • Select your project on the left pane under “Available” and press Add> to move it to the right pane under Configured; press Finish;

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

Eclipse 4.2 (Juno) 'Cannot create a server using the selected type' in Tomcat 7 - Stack Overflow.html的更多相关文章

  1. 在Eclipse中配置Tomcat时,出现Cannot create a server using the selected type错误

    在eclipse中配置Tomcat时,出现Cannot create a server using the selected type错误 原因:Tomcat被删除或者是重新安装,并且安装目录改变了. ...

  2. eclipse new server Cannot create a server using the selected type 网上有两种办法,其实原理一样

    eclipse new server Cannot create a server using the selected type 网上有两种办法,其实原理一样 第一种说法: 还真的找到解决的方法了, ...

  3. 解决在eclipse中配置Tomcat时,出现"Cannot create a server using the selected type"的错误

    比如说使用tomcat 这是因为你之前创建过一次,比如说tomcat6,你指定的目录是:D:/tomcat-6.0.3 后来因为某种原因你把tomcat删了,然后你又安装到了E:/tomcat-6.0 ...

  4. Tomcat --> Cannot create a server using the selected type

    今天在eclipse想把之前的Tomcat 6删掉,重新配置一个,不料没有下一步 Cannot create a server using the selected type 这句话出现在窗口上面,应 ...

  5. Eclipse new server : Cancnot create a server using the selected type

    1.退出 eclipse 2.到[工程目录下]/.metadata/.plugins/org.eclipse.core.runtime 3.把org.eclipse.wst.server.core.p ...

  6. 解决 eclipse tomcat cannot create a server using the selected type

    解决的方法 1.退出eclipse: 2.打开 [工程目录下]/.metadata/.plugins/org.eclipse.core.runtime/.settings目录: 3.删除org.ecl ...

  7. 在eclipse中配置Tomcat时,出现“Cannot create a server using the selected type”的错误。

    出现原因:Tomcat重新安装,并且安装目录改变了. 解决方案:在“Window->preferences->Server->Runtime Environment”,编辑Tomca ...

  8. Cannot create a server using the selected type.

    1.退出 eclipse 2.到[工程目录下]/.metadata/.plugins/org.eclipse.core.runtime 3.把org.eclipse.wst.server.core.p ...

  9. 创建Server(tomcat)时候报Cannot create a server using the selected type

    1.退出 eclipse 2.到[工程目录下]/.metadata/.plugins/org.eclipse.core.runtime/.settings 3.把org.eclipse.wst.ser ...

随机推荐

  1. PHP eof的使用

    PHP eof的使用 也就是heredoc技术,来部分实现界面与代码的分离 <?php $name = '张三'; print <<<EOT <html> < ...

  2. 12、Java中的接口

    接口:初期理解,可以认为是一个特殊的抽象类 当抽象类中的方法都是抽象的,那么该类可以通过接口的形式来表示.class用于定义类interface 用于定义接口. 接口定义时,格式特点:1,接口中常见定 ...

  3. [ZZ] Equal Error Rate (EER)

    这篇博客很全面 http://www.cnblogs.com/cdeng/p/3471527.html ROC曲线 1.混淆矩阵(confusion matrix) 针对预测值和真实值之间的关系,我们 ...

  4. 简单的聊天室代码php+swoole

    php swoole+websocket 客户端代码 <!DOCTYPE html> <html> <head> <title></title&g ...

  5. Managing a node remotely by using the netapp SP

    Managing a node remotely by using the Service Processor The Service Processor (SP) is a remote manag ...

  6. float和double在内存中的存储方式

    本文转载于:http://wenku.baidu.com/link?url=ARfMiXVHCwCZJcqfA1gfeVkMOj9RkLlR9fIexbgs9gDdV8rIS48A1_xe1y6YgX ...

  7. 【转】C#多线程Lock使用

    一.Lock定义     lock 关键字可以用来确保代码块完成运行,而不会被其他线程中断.它可以把一段代码定义为互斥段(critical section),互斥段在一个时刻内只允许一个线程进入执行, ...

  8. 第一次用阿里云ecs配置pptp vpn遇到的问题。

    在国外没办法使用一些国内一些涉及版权的网站,各种音乐和视频都没法看很不爽.自己租了个ecs.vps上安装vpn网上很多教程,但是有些地方只是copy上去还是不行的,得根据vps的具体情况改动一下才可以 ...

  9. OC中copy的使用

    @property内存管理策略的选择 1.非ARC 1> copy : 只用于NSString\block: 2> retain : 除NSString\block以外的OC对象: 3&g ...

  10. XF 文档 - Element Framework Doc

    配置篇 Chapter Configuration Schema篇 Chapter Schema 查询篇 Chapter Querying Data 数据更改及验证篇 Chapter Data Mod ...