zoukankan      html  css  js  c++  java
  • Eclipse 4.2 (Juno) 'Cannot create a server using the selected type' in Tomcat 7

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

    原文: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
  • 相关阅读:
    在集群环境中使用 EhCache 缓存系统|RMI 集群模式
    oracle中的针对该库的表
    oracle:触发器,自治事务 trigger
    PL/SQL中查询某的时间段内所有执行的sql
    金额input框控制只能小数点后有两位的有效数字
    JS判断键盘上的上下左右键
    MySQL按照汉字的拼音排序
    JAVA经典总结
    普通for循环遍历LinkedList弊端
    EASYUI 1.4版 combobox firefox 下不支持中文检索的问题
  • 原文地址:https://www.cnblogs.com/qqhfeng/p/6243709.html
Copyright © 2011-2022 走看看