1. 程式人生 > >Server MyEclipse Tomcat v7.0 was unable to start within 45 seconds. If the server requires more time

Server MyEclipse Tomcat v7.0 was unable to start within 45 seconds. If the server requires more time

我們在啟動Tomcat的時候,經常會報這種錯誤:

Server MyEclipse Tomcat v7.0 was unable to start within 45 seconds. If the server requires more time

翻譯為:

MyEclipse 的tomcat不能再45秒內啟動服務。伺服器需要更長的時間;

那麼,我們就將Tomcat啟動的值設定成更長的時間:

1.我們在MyEclipse工作目錄中找到:workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml檔案。

2.把其中的start-timeout="45" 改為  start-timeout="450" 或者更長,根據工程大小來設定。

程式碼如下:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<servers>
  <server DRIVER_CREATED_2="true" HOME_DIR="C:/Users/user/.myeclipse/derby" PORT="1527" derby_autostart_timeout="3000" derby_enable_autostart="true" hostname="localhost" id="com.genuitec.derby.server" id-set="true" me-disable-overview-page="true" name="MyEclipse Derby" server-type="com.genuitec.derby.server" server-type-id="com.genuitec.derby.server" single-instance="true" start-timeout="240" stop-timeout="240" timestamp="0"/>
  <server auto-publish-setting="2" auto-publish-time="1" configuration-id="/Servers/MyEclipse Tomcat v7.0-config" deployDir="wtpwebapps" has-configuration="true" hostname="localhost" id="com.genuitec.embedded.tomcat.server.v70" id-set="true" java-location="D:\MyEclipse 2016 CI\binary\com.sun.java.jdk8.win32.x86_64_1.8.0.u66" name="MyEclipse Tomcat v7.0" runtime-id="com.genuitec.embedded.tomcat.runtime.v70" server-location="D:\MyEclipse 2016 CI\plugins\com.genuitec.eclipse.server.embedded.tomcat.core_13.0.0.me201602031002\tomcat70" server-type="com.genuitec.embedded.tomcat.server.v70" server-type-id="com.genuitec.embedded.tomcat.server.v70" single-instance="true" start-timeout="450" stop-timeout="15" testEnvironment="false" timestamp="1" useAutoDeploy="true">
    <list key="modules" value0="OneMuWe::org.eclipse.jst.jee.server:OneMuWe::jst.web::3.0%%EXPLODED"/>
  </server>
</servers>

3.重啟MyEclipse。

這樣問題就完美的解決了。

 

作者:Roger_CoderLife

連結:https:blog.csdn.net/Roger_CoderLife/article/details/84175469

本文為Roger_CoderLife的原創文章,著作權歸作者所有,轉載請註明原文出處,歡迎轉載!