質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Tomcat

TomcatはApache Software Foundation (ASF)で開発されたオープンソースのWebコンテナです。

Q&A

4回答

24026閲覧

Tomcatが上手く起動しない

退会済みユーザー

退会済みユーザー

総合スコア0

Tomcat

TomcatはApache Software Foundation (ASF)で開発されたオープンソースのWebコンテナです。

0グッド

1クリップ

投稿2017/05/13 07:33

###前提・実現したいこと
アプリケーションの開発初心者です。
これから勉強しようとしています。
こちらでの質問も初めてですが、
皆様のお力をどうかお貸しください。

###発生している問題・エラーメッセージ
久しぶりにEclipsを起動し、Tomcatを起動すると下記のような
エラーメッセージが出ました。
半年前にEclipsを設定した時は正常に動きました。

自分でエラーメッセージを元にネットで似たような事象で解決を図りましたが解決できませんでした。
原因と解決方法を教えてください。

エラーメッセージ 重大: A child container failed during start [土 5 13 16:12:18 GMT+09:00 2017] 重大: A child container failed during start [土 5 13 16:12:18 GMT+09:00 2017] 重大: The required Server component failed to start so Tomcat is unable to start. [土 5 13 16:12:18 GMT+09:00 2017]

###該当のソースコード

情報: Server version: Apache Tomcat/7.0.68 [土 5 13 16:12:13 GMT+09:00 2017] 情報: Server built: Feb 8 2016 20:25:54 UTC [土 5 13 16:12:13 GMT+09:00 2017] 情報: Server number: 7.0.68.0 [土 5 13 16:12:13 GMT+09:00 2017] 情報: OS Name: Windows 8.1 [土 5 13 16:12:13 GMT+09:00 2017] 情報: OS Version: 6.3 [土 5 13 16:12:13 GMT+09:00 2017] 情報: Architecture: amd64 [土 5 13 16:12:13 GMT+09:00 2017] 情報: Java Home: C:\Eclipse\pleiades\java\7\jre [土 5 13 16:12:13 GMT+09:00 2017] 情報: JVM Version: 1.7.0_80-b15 [土 5 13 16:12:13 GMT+09:00 2017] 情報: JVM Vendor: Oracle Corporation [土 5 13 16:12:13 GMT+09:00 2017] 情報: CATALINA_BASE: C:\Eclipse\pleiades\tomcat\7 [土 5 13 16:12:13 GMT+09:00 2017] 情報: CATALINA_HOME: C:\Eclipse\pleiades\tomcat\7 [土 5 13 16:12:13 GMT+09:00 2017] 情報: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:50824 [土 5 13 16:12:13 GMT+09:00 2017] 情報: Command line argument: -Dcatalina.home=C:\Eclipse\pleiades\tomcat\7 [土 5 13 16:12:13 GMT+09:00 2017] 情報: Command line argument: -Djava.endorsed.dirs=C:\Eclipse\pleiades\tomcat\7\endorsed [土 5 13 16:12:13 GMT+09:00 2017] 情報: Command line argument: -Dcatalina.base=C:\Eclipse\pleiades\tomcat\7 [土 5 13 16:12:13 GMT+09:00 2017] 情報: Command line argument: -Djava.io.tmpdir=C:\Eclipse\pleiades\tomcat\7\temp [土 5 13 16:12:13 GMT+09:00 2017] 情報: Command line argument: -Dfile.encoding=UTF-8 [土 5 13 16:12:13 GMT+09:00 2017] 情報: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Eclipse\pleiades\java\7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Eclipse\pleiades\java\7\jre\bin;C:/Eclipse/pleiades/eclipse/jre/bin/../jre/bin/server;C:/Eclipse/pleiades/eclipse/jre/bin/../jre/bin;C:/Eclipse/pleiades/eclipse/jre/bin/../jre/lib/amd64;C:\Pleiades\java\7\bin;C:\Program Files\Java\jdk1.7.0_79\bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Program Files\Java\jdk1.7.0_79\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Hewlett-Packard\SimplePass\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Eclipse\pleiades\eclipse;;. [土 5 13 16:12:13 GMT+09:00 2017] 情報: Initializing ProtocolHandler ["http-bio-8000"] [土 5 13 16:12:13 GMT+09:00 2017] 情報: Initializing ProtocolHandler ["ajp-bio-8009"] [土 5 13 16:12:13 GMT+09:00 2017] 情報: Initialization processed in 2093 ms [土 5 13 16:12:13 GMT+09:00 2017] 情報: サービス Catalina を起動します [土 5 13 16:12:14 GMT+09:00 2017] 情報: Starting Servlet Engine: Apache Tomcat/7.0.68 [土 5 13 16:12:14 GMT+09:00 2017] 情報: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. [土 5 13 16:12:16 GMT+09:00 2017] 情報: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [252] milliseconds. [土 5 13 16:12:16 GMT+09:00 2017] 情報: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. [土 5 13 16:12:17 GMT+09:00 2017] 情報: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. [土 5 13 16:12:18 GMT+09:00 2017] 重大: A child container failed during start [土 5 13 16:12:18 GMT+09:00 2017] 重大: A child container failed during start [土 5 13 16:12:18 GMT+09:00 2017] 重大: The required Server component failed to start so Tomcat is unable to start. [土 5 13 16:12:18 GMT+09:00 2017] 情報: Pausing ProtocolHandler ["http-bio-8000"] [土 5 13 16:12:18 GMT+09:00 2017] 情報: Pausing ProtocolHandler ["ajp-bio-8009"] [土 5 13 16:12:18 GMT+09:00 2017] 情報: サービス Catalina を停止します [土 5 13 16:12:18 GMT+09:00 2017] 情報: Destroying ProtocolHandler ["http-bio-8000"] [土 5 13 16:12:18 GMT+09:00 2017] 情報: Destroying ProtocolHandler ["ajp-bio-8009"] [土 5 13 16:12:18 GMT+09:00 2017]

###試したこと
ポート番号の競合が発生していないか
→発生していない
###補足情報(言語/FW/ツール等のバージョンなど)
OS:Windows8
Java:1.7.0_79
tomcat:tomcat7

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答4

0

ご確認くださりありがとうございます。

<Context>が複数ありますが、起動対象のWebプロジェクトはどれでしょうか?
⇒起動対象のWebプロジェクトはserver.xmlの最後の<Context>である"/JDBC_Web"です。

<Context path="/JDBC_Web" reloadable="true"docBase="C:\Eclipse\pleiades\workspace\JDBC_Web" workDir="C:\Eclipse\pleiades\workspace\JDBC_Web\work" />

>起動Webプロジェクトが設定されていないように思います。
⇒source="org.eclipse.jst.j2ee.server:tutorial-thin"のように指定が無いということでしょうか?

起動webプロジェクトの設定方法で一度、調べてみます。

投稿2017/05/21 12:27

occultrabi

総合スコア12

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

sever.xmlを確認しました。
<Context>が複数ありますが、起動対象のWebプロジェクトはどれでしょうか?
(Sample? Login_Web?)
起動Webプロジェクトが設定されていないように思います。

私の環境

[tutorial-thin]を起動対象のWebプロジェクトにすると、server.xmlには以下の<Context>が追加されました。

<Context docBase="tutorial-thin" path="/tutorial-thin" reloadable="false" source="org.eclipse.jst.j2ee.server:tutorial-thin"/>

イメージ説明

投稿2017/05/15 14:10

yuji38kwmt

総合スコア437

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

ご回答くださりありがとうございます。

上記の3つ調べてみます。

server.xmlに記載してるものを以下に貼ります。

<?xml version='1.0' encoding='utf-8'?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Note: A "Server" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/server.html --> <Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <!-- Security listener. Documentation at /docs/config/listeners.html <Listener className="org.apache.catalina.security.SecurityListener" /> --> <!--APR library loader. Documentation at /docs/apr.html --> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --> <Listener className="org.apache.catalina.core.JasperListener" /> <!-- Prevent memory leaks due to use of particular java/javax APIs--> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --> <GlobalNamingResources> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" Note: A "Service" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/service.html --> <Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools--> <!-- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> --> <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="8000" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <!-- A "Connector" using the shared thread pool--> <!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> --> <!-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the BIO implementation that requires the JSSE style configuration. When using the APR/native implementation, the OpenSSL style configuration is required as described in the APR/native documentation --> <!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="true" sslProtocol="TLS" /> --> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> <!-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html --> <!-- You should set jvmRoute to support load-balancing via AJP ie : <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"> --> <Engine name="Catalina" defaultHost="localhost"> <!--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) --> <!-- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> --> <!-- Use the LockOutRealm to prevent attempts to guess user passwords via a brute-force attack --> <Realm className="org.apache.catalina.realm.LockOutRealm"> <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase". Any edits that are performed against this UserDatabase are immediately available for use by the Realm. --> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <!-- Access log processes all example. Documentation at: /docs/config/valve.html Note: The pattern used is equivalent to using pattern="common" --> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
<Context path="/Sample" reloadable="true" docBase="C:\Eclipse\pleiades\workspace\Sample" workDir="C:\Eclipse\pleiades\workspace\Sample\work" /> <Context path="/JDBC_Console" reloadable="true" docBase="C:\Eclipse\pleiades\workspace\JDBC_Console" workDir="C:\Eclipse\pleiades\workspace\JDBC_Console\work" /> <Context path="/Login_Web" reloadable="true" docBase="C:\Eclipse\pleiades\workspace\User_Edit" workDir="C:\Eclipse\pleiades\workspace\User_Edit\work" /> <Context path="/Team" reloadable="true" docBase="C:\Eclipse\pleiades\workspace\Team" workDir="C:\Eclipse\pleiades\workspace\Team\work" /> <Context path="/Te" reloadable="true" docBase="C:\Eclipse\pleiades\workspace\Te" workDir="C:\Eclipse\pleiades\workspace\Te\work" /> <Context path="/KansaiSietar" reloadable="true" docBase="C:\Eclipse\pleiades\workspace\KansaiSietar" workDir="C:\Eclipse\pleiades\workspace\KansaiSietar\work" /> <Context path="/JDBC_Web" reloadable="true" docBase="C:\Eclipse\pleiades\workspace\JDBC_Web" workDir="C:\Eclipse\pleiades\workspace\JDBC_Web\work" />
</Host> </Engine>
</Service> </Server>

投稿2017/05/14 17:09

occultrabi

総合スコア12

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

EclipseからTomcatが起動しないとき、私が確認する内容です。

  • Serverプロジェクト(サーバを追加すると自動で生成される)が開いているか
  • 起動対象のWebプロジェクトが開いているか
  • Tomcatに起動対象のWebプロジェクトが配備されているか

差支えなければ、Serverプロジェクト内のserver.xmlも教えてください。

投稿2017/05/14 02:33

yuji38kwmt

総合スコア437

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問