Tomcat V8.5 not booting, error: Child container failed During start

Asked

Viewed 2,116 times

2

I’m doing a college paper, a simple crud with JSF2, Hibernate, Primefaces and CDI. However at the moment I will initialize the project in Tomcat I have the following error:

GRAVE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TrabalhoFaculdade]]

Follow full error log:

ago 27, 2017 1:53:35 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TrabalhoFaculdade' did not find a matching property.
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version:        Apache Tomcat/8.5.20
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built:          Aug 2 2017 21:35:49 UTC
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server number:         8.5.20.0
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name:               Linux
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version:            4.9.0-3-amd64
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture:          amd64
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Java Home:             /usr/lib/jvm/jdk-oracle/jre
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version:           1.8.0_131-b11
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor:            Oracle Corporation
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE:         /home/christiano/Documentos/Trabalho/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME:         /home/christiano/apache-tomcat-8.5.20
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=/home/christiano/Documentos/Trabalho/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=/home/christiano/apache-tomcat-8.5.20
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=/home/christiano/Documentos/Trabalho/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=/home/christiano/apache-tomcat-8.5.20/endorsed
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=UTF-8
ago 27, 2017 1:53:35 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
ago 27, 2017 1:53:35 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8080"]
ago 27, 2017 1:53:35 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
ago 27, 2017 1:53:35 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["ajp-nio-8009"]
ago 27, 2017 1:53:35 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
ago 27, 2017 1:53:35 PM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 1837 ms
ago 27, 2017 1:53:35 PM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service [Catalina]
ago 27, 2017 1:53:35 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.5.20
ago 27, 2017 1:53:36 PM org.apache.catalina.core.ContainerBase startInternal
GRAVE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TrabalhoFaculdade]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TrabalhoFaculdade]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    ... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@28578a16]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4860)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4992)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@4acd9788]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:721)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:113)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
    ... 12 more
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
    at java.util.zip.ZipFile.read(Native Method)
    at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
    at sun.misc.IOUtils.readFully(IOUtils.java:65)
    at java.util.jar.JarFile.getBytes(JarFile.java:425)
    at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
    at java.util.jar.JarFile.getManifest(JarFile.java:180)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:111)
    ... 13 more

ago 27, 2017 1:53:37 PM org.apache.catalina.core.ContainerBase startInternal
GRAVE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:656)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more

ago 27, 2017 1:53:37 PM org.apache.catalina.startup.Catalina start
GRAVE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:656)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

ago 27, 2017 1:53:37 PM org.apache.coyote.AbstractProtocol pause
INFORMAÇÕES: Pausing ProtocolHandler ["http-nio-8080"]
ago 27, 2017 1:53:37 PM org.apache.coyote.AbstractProtocol pause
INFORMAÇÕES: Pausing ProtocolHandler ["ajp-nio-8009"]
ago 27, 2017 1:53:37 PM org.apache.catalina.core.StandardService stopInternal
INFORMAÇÕES: Stopping service [Catalina]
ago 27, 2017 1:53:37 PM org.apache.coyote.AbstractProtocol destroy
INFORMAÇÕES: Destroying ProtocolHandler ["http-nio-8080"]
ago 27, 2017 1:53:37 PM org.apache.coyote.AbstractProtocol destroy
INFORMAÇÕES: Destroying ProtocolHandler ["ajp-nio-8009"]

I wonder if someone could give me a hand?

Follow the pom.xml:

  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.TrabalhoFaculdade</groupId>
        <artifactId>TrabalhoFaculdade</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>war</packaging>
        <dependencies>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.faces</artifactId>
                <version>2.3.0</version>
            </dependency>
            <dependency>
                <groupId>org.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>5.1</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>4.3.10.Final</version>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.6</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld.servlet</groupId>
                <artifactId>weld-servlet</artifactId>
                <version>2.2.9.Final</version>
            </dependency>
        </dependencies>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </project>
  • This is looking like a disfigured project in Eclipse. You happen to be using Maven?

  • romarcio, yes, I’m using Maven, I’m learning now. how do I set up?

  • I will reply as "answer" since I will post a code snippet.

2 answers

1

The error is actually lower:

Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
    at java.util.zip.ZipFile.read(Native Method)
    at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
    at sun.misc.IOUtils.readFully(IOUtils.java:65)
    at java.util.jar.JarFile.getBytes(JarFile.java:425)
    at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
    at java.util.jar.JarFile.getManifest(JarFile.java:180)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:111)
    ... 13 more

As you are using Maven, sometimes (much depending on the network and adverse situations), a JAR of your local artifactory may come broken (some bytes have been corrupted during remote repository transfer).

A tip to find out which JAR is presenting problems:

  1. Add a breakpoint to the class JarFile.java:425 (line 425)
  2. Falling at the breakpoint presenting problem, in the parent class ZipFile you can check the name through the property name

To force the download of the artifact again, you must go to be artifactory local, delete the artifact-related folder, and build the project again (clean install).

If this approach does not work, the JAR still presents problems, you can install the JAR locally from an artifact. This second approach should be used in LAST CASE, whereas you will have to install JAR also in your company’s artifactory generally.

0

Do the following, let Maven manage the project and not eclipse it. To do this, add the following configuration in pom.xml

<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
    </plugins>
</build>

After adding this configuration, if necessary, do a Maven Update. If you still don’t resolve it, delete the Eclipse project. Then enter the project folder and remove the folders and files from Eclipse. Go back to Eclipse and import the project via Maven > Exists Maven Project. This should solve.

  • Romarcio, I did the procedures and the same error occurs. I added the pom the question, you can check if you have any inconsistencies?

  • Your pom.xml seems to be okay. Try to clean the project on the server, there in the server tab, in the window below the eclipse source editor, click on the server and then on 'clean' or 'clean project'. Then do a Maven Update and try running the application.

  • Romarcio did not work, the funny thing is that the log says that one contains son did not load, more does not say which.

  • Gee, now I don’t know what it could be. Maybe some of the corrupted dependencies. Try changing the version of each dependency to see if anything changes.

  • @romarcio, includes details to identify the problem, but his last kick was very close :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.