■「Server Tomcat vX.0 Server at localhost was unable to start within 45 seconds ...」が表示される
詳細
* Eclipse + Tomcat 上でServerを開始した際に、以下のエラーが表示された
エラー表示内容
Server Tomcat vX.0 Server at localhost was unable to start within 45 seconds.
If the server requires more time, try increasing the timeout in the server editor
解決方法
以下の手順を行う
[1] Eclipseでservers viewを開く
[2] 対象のサーバをダブルクリック
[3] Timeout値をあげる
■「cannot create a server using the selected type」が表示される
詳細
cannot create a server using the selected type
(日本語:選択されたタイプを使用してサーバーを作成できません)
が表示される
解決方法
以下の手順を行う
[1] Eclipseで[Windows]-[Preferences]-[Server]-[Runtime Enviroments]を選択
[2] 該当するTomcat のインストールフォルダを指定し直す
参考文献
http://d.hatena.ne.jp/kzk-y/20090317
■「The server cannot be started because one or more of the ports are invalid」が表示される
詳細
* Eclipse + Tomcatで、JSPを実行したところ、以下のエラー内容が表示される
エラー内容
The server cannot be started because one or more of the ports are invalid.
Open the server editor and correct the invalid ports.
原因
* server.xml のshutdownポートを「-1」に
「<Server port="-1" shutdown="SHUTDOWN">」としていた
解決方法
* ポート番号を利用していない1~65535の整数値を設定する
例:「<Server port="8005" shutdown="SHUTDOWN">」。
補足
* なお、「-1」にすること自体は間違ってない。詳細は下記の関連記事を参照のこと。
http://blogs.yahoo.co.jp/dk521123/33578498.html
詳細
* EclipseのTomcatの設定を一度削除し、再度、設定しなおした際に
Servlet系のクラスが赤波線になり「HttpServlet cannot be resolved to a type」などの
エラーとなり実行できない。
原因
* 対象のプロジェクトを右クリックし、[Properties]-[Targeted runtimes]で
サーバにチェックが何もついてなかった
解決方法
[1] 対象のプロジェクトを右クリックし、[Properties]-[Targeted runtimes] を選択
[2] 対象のサーバにチェックを付け、「OK」を押下