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

原文: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. vs2008及以上的ActiveX测试容器在哪儿

    解压缩 vssetupdir \Samples\1033\VC2010Samples.zip ,位于C++\MFC\ole\TstCon\ vs2008中的sample的话,要改TCProps项目的L ...

  2. [Linux] - CentOS中文乱码解决办法

    CentOS 7 终端中文乱码解决办法: 1.使用vim编辑locale.config文件: vim /etc/locale.conf 2.将LANG="en_US.UTF-8"修 ...

  3. SSIS 文件系统任务无法使用变量配置目标路径

    SSIS 文件系统任务无法使用变量配置目标路径 需求: 在SSIS2012中,某个从平面文件导入数据的包中,需要把处理出错的文件拷贝到一个专门的文件夹,便于管理人员及时处理. 问题描述: 1. 在包参 ...

  4. 关于使用TP-Link桥接小米路由器

    家里因为有个小卧室,小卧室的写字台上面放了一台台式电脑,而我又不想用台式电脑牵一条长线到客厅的网口或者路由器上面,因为太麻烦,所以我使用了TPLink的无线USB插在了我的主机USB上,略去TPLIN ...

  5. MVC3升级为MVC4

    在程序包管理控制台输入 Install-Package UpgradeMvc3ToMvc4 等待 升级完成

  6. i2c 读写

    在I2C设备读取,必须是在同一个周期内. 一个例子,可以同时读出两个值 int read_register_double_value(int reg_addr, unsigned char *valu ...

  7. H5的一些小问题

    [每日壹闻]常用HTML代码解释-------六.歌曲代码(1):在这组代码中,不必管它是mms.http.rtsp,只要看尾缀是asf.wma.wmv.wmv.rm都可适用下面的代码:1. 手动播放 ...

  8. 安装centOS分区的图解记录

    要将linux的boot loader安装在MBR上,才能起到多重引导的作用.

  9. Linux学习笔记之——安装虚拟机后,如何启用网卡

    版本:CentOS-6.5-i386-minimal 虚拟机:vmware 11.1.2   安装完之后是看不到网卡信息的,如下:         我们编辑网卡etho的配置信息:         将 ...

  10. 搞定迅雷固件在TP-LINK WR720N,127.0.0.1 9000 获取不到激活码

    本帖最后由 exzzzipad 于 2014-7-2 22:33 编辑 基本情况:设备:TP-LINK WR720N目前固件:[antclan][20120825]720N-4M-NAS-withSA ...