无法通过Eclipse

时间:2015-10-26 16:15:53

标签: java tomcat ubuntu

我在Ubuntu上运行Tomcat 8和eclipse mars。当我尝试通过eclipse启动Tomcat时,它只是挂起。我尝试了Tomcat Not Starting Through Eclipse (Timeout)中的解决方案 包括:

  1. 设置我的主机文件有127.0.0.1 localhost
  2. 设置窗口 - >     偏好 - >一般 - >要直接的网络连接
  3. 将-Djava.net.preferIPv4Stack = true添加到eclipse.ini
  4. 控制台输出:

    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server version:        Apache Tomcat/8.0.28
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server built:          Oct 7 2015 18:25:21 UTC
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server number:         8.0.28.0
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Name:               Linux
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Version:            3.13.0-24-generic
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Architecture:          amd64
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Java Home:             /opt/java/jdk1.7.0_79/jre
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Version:           1.7.0_79-b15
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Vendor:            Oracle Corporation
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_BASE:         /home/weblogic/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_HOME:         /opt/apache-tomcat-8.0.28
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:43256
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.base=/home/weblogic/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.home=/opt/apache-tomcat-8.0.28
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dwtp.deploy=/home/weblogic/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.endorsed.dirs=/opt/apache-tomcat-8.0.28/endorsed
    Oct 26, 2015 12:06:56 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dfile.encoding=UTF-8
    Oct 26, 2015 12:06:56 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/oracle/11.2/client/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    Oct 26, 2015 12:06:57 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-nio-8080"]
    Oct 26, 2015 12:06:57 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFO: Using a shared selector for servlet write/read
    Oct 26, 2015 12:06:57 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
    Oct 26, 2015 12:06:57 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFO: Using a shared selector for servlet write/read
    Oct 26, 2015 12:06:57 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 3816 ms
    Oct 26, 2015 12:06:57 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Oct 26, 2015 12:06:57 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/8.0.28
    Oct 26, 2015 12:06:59 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-nio-8080"]
    Oct 26, 2015 12:06:59 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-nio-8009"]
    Oct 26, 2015 12:06:59 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2091 ms
    

2 个答案:

答案 0 :(得分:0)

它已经开始了。你在找什么?

从任何网络浏览器转到localhost:8080。如果您已经定义了index.html文件,那么它将在那里显示输出。

答案 1 :(得分:0)

我双击服务器,转到"服务器位置"并从"使用工作空间元数据"切换to"使用Tomcat安装"。