子容器在启动期间失败

时间:2015-04-24 07:08:33

标签: java tomcat servlets

我正面临这个错误。我尝试提供。但没有运气,改变了eclipse.ini        打开文件        --launcher.XXMaxPermSize        512M        -showsplash        org.eclipse.platform        --launcher.XXMaxPermSize        1024米 并尝试使用eclipse运行配置Java应用程序>参数-Xms512M -Xmx1024M

 Apr 24, 2015 11:57:12 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:IHMantraCustomer' did not find a matching property.
Apr 24, 2015 11:57:13 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8081"]
Apr 24, 2015 11:57:13 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8010"]
Apr 24, 2015 11:57:13 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1821 ms
Apr 24, 2015 11:57:13 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 24, 2015 11:57:13 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
Apr 24, 2015 11:58:12 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.io.DataInputStream.readUTF(DataInputStream.java:661)
at java.io.DataInputStream.readUTF(DataInputStream.java:564)
at org.apache.tomcat.util.bcel.classfile.ConstantUtf8.<init>(ConstantUtf8.java:48)
at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:129)
at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:60)
at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209)
at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2066)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1942)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1908)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1893)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1296)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:346)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
... 7 more

Apr 24, 2015 11:58:12 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: 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:188)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more

Apr 24, 2015 11:58:12 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8006]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
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:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
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:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more

Apr 24, 2015 11:58:12 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 59088 ms

我的POM文件是

        <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.ihm.customer</groupId>
          <artifactId>IHMantraCustomer</artifactId>
          <version>0.0.1-SNAPSHOT</version>
          <packaging>war</packaging>
          <name>IHMantraCustomer</name>
          <url>http://maven.apache.org</url>    
            <properties>      
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
                <org.springframework.version>3.2.1.RELEASE</org.springframework.version>
                <surefire.version>2.12</surefire.version>
                <compiler.version>1.7</compiler.version>  
                <org.jsf.version>2.1.13</org.jsf.version>
                <org.primefaces.version>5.0</org.primefaces.version>
                <testng.version>6.1.1</testng.version>
            </properties> 
                <dependencies>
                <!-- Spring Security Dependency starts -->

                    <dependency>
                        <groupId>org.springframework.social</groupId>
                        <artifactId>spring-social-security</artifactId>
                        <version>1.1.0.RELEASE</version>
                    </dependency>

                    <dependency>
                        <groupId>org.springframework.social</groupId>
                        <artifactId>spring-social-google</artifactId>
                        <version>1.0.0.RELEASE</version>
                    </dependency>

                    <dependency>
                        <groupId>org.springframework.social</groupId>
                        <artifactId>spring-social-facebook</artifactId>
                        <version>1.0.0.RELEASE</version>
                    </dependency>


                    <dependency>
                        <groupId>org.springframework.security</groupId>
                        <artifactId>spring-security-core</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>

                    <dependency>
                        <groupId>org.springframework.security</groupId>
                        <artifactId>spring-security-web</artifactId>
                        <version>3.2.1.RELEASE</version>
                    </dependency>

                    <dependency>
                        <groupId>org.springframework.security</groupId>
                        <artifactId>spring-security-config</artifactId>
                        <version>3.2.1.RELEASE</version>
                    </dependency>

                    <!-- Spring Security Dependency Ends -->
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-web</artifactId>
                        <version>3.2.1.RELEASE</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-core</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-expression</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-beans</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-aop</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context-support</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-jdbc</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-tx</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>commons-lang</groupId>
                        <artifactId>commons-lang</artifactId>
                        <version>2.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-orm</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-oxm</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-test</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                        <version>1.2.16</version>
                    </dependency>
                    <dependency>
                        <groupId>commons-io</groupId>
                        <artifactId>commons-io</artifactId>
                        <version>1.4</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-io</artifactId>
                        <version>1.3.2</version>
                    </dependency>
                    <dependency>
                        <groupId>commons-dbcp</groupId>
                        <artifactId>commons-dbcp</artifactId>
                        <version>1.2.2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                        <version>3.3.0.CR1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-annotations</artifactId>
                        <version>3.4.0.GA</version>
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                        <version>1.6.2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                        <version>1.6.2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.testng</groupId>
                        <artifactId>testng</artifactId>
                        <version>${testng.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>cglib</groupId>
                        <artifactId>cglib</artifactId>
                        <version>2.2.2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>1.7.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>1.7.1</version>
                    </dependency>
                    <!-- MySQL database driver Start-->
                    <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>5.1.9</version>
                    </dependency>
                    <!-- MySQL database driver End-->
                    <!-- Primefaces Dependency Start -->
                    <dependency>
                        <groupId>org.primefaces</groupId>
                        <artifactId>primefaces</artifactId>
                        <version>${org.primefaces.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.primefaces.themes</groupId>
                        <artifactId>bootstrap</artifactId>
                        <version>1.0.10</version>
                    </dependency>
                    <!-- Primefaces Dependency End -->
                    <!-- JSF Setting Start  -->
                    <dependency>
                      <groupId>com.sun.faces</groupId>
                      <artifactId>jsf-api</artifactId>
                      <version>${org.jsf.version}</version>
                      </dependency>
                    <dependency>
                      <groupId>com.sun.faces</groupId>
                      <artifactId>jsf-impl</artifactId>
                      <version>${org.jsf.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>javax.servlet</groupId>
                      <artifactId>jstl</artifactId>
                      <version>1.2</version>
                      <scope>provided</scope>
                    </dependency>
                    <!-- JSF Setting End -->
                    <!-- Servlet-API Dependency Start -->
                    <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>
                        <version>2.5</version>
                        <scope>provided</scope>
                    </dependency>
                    <!-- Servlet-API Dependency End -->
                    <!-- Junit dependency Start -->
                    <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>3.8.1</version>
                        <scope>test</scope>
                    </dependency>
                    <!-- Junit dependency End -->
                    <!-- EL Dependency Start -->
                    <dependency>
                        <groupId>org.apache.tomcat</groupId>
                        <artifactId>el-api</artifactId>
                        <version>6.0.13</version>
                        <scope>provided</scope>
                    </dependency>

        <!-- EL Dependency End -->
                    <!-- Java Mail API -->
                    <dependency>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                        <version>1.4.3</version>
                        <scope>provided</scope>
                    </dependency>

                    <dependency>
                        <groupId>com.amazonaws</groupId>
                        <artifactId>aws-java-sdk</artifactId>
                        <version>1.9.28</version>
                    </dependency>

        <!-- restfaces -->                   
                    <dependency>     
                        <groupId>org.restfaces</groupId>
                        <artifactId>restfaces</artifactId>
                        <version>1.3.1.1-SNAPSHOT</version>
                    </dependency>
                    <!-- ~restfaces -->
        <!-- JSON dependency Start -->
                    <dependency>
                        <groupId>com.googlecode.json-simple</groupId>
                        <artifactId>json-simple</artifactId>
                        <version>1.1.1</version>
                    </dependency>

        <!-- JSON dependency End -->    
                </dependencies>

            <repositories>
                <!-- Primefaces Maven Remote Repository Start   --> 
                <repository>  
                    <id>prime-repo</id>  
                    <name>PrimeFaces Maven Repository</name>  
                    <url>http://repository.primefaces.org</url>  
                    <layout>default</layout>  
                </repository> 
                <repository>
        <id>maven2-repository.dev.java.net</id>
        <name>Java.net Repository for Maven</name>
        <url>http://download.java.net/maven/2</url>
        </repository>
                <!--   Primefaces Maven Remote Repository End  --> 
            </repositories>

            <build>
                <finalName>IHMantraCustomer</finalName>
                    <resources>
                        <resource>
                          <!-- This include everything else under src/main/java directory -->
                          <directory>${basedir}/src/main/java</directory>
                          <excludes>
                            <exclude>**/*.java</exclude>
                          </excludes>
                        </resource>
                        <resource>
                          <!-- This include everything under src/main/resources directory -->
                          <directory>${basedir}/src/main/resources</directory>
                        </resource>
                    </resources>

                    <plugins>
                        <!-- Testing ReportingPLugin Start -->
                            <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
                                <version>${surefire.version}</version>
                                <configuration>
                                    <suiteXmlFiles>
                                        <suiteXmlFile>${basedir}/src/main/resources/testng.xml</suiteXmlFile>
                                    </suiteXmlFiles>
                                </configuration>
                            </plugin>
                        <!-- Testing ReportingPLugin End -->    

                        <!-- Comipler Plugin Start -->
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                <encoding>utf8</encoding>
                                <source>${compiler.version}</source>
                                <target>${compiler.version}</target>
                            </configuration>
                        </plugin>
                        <!-- Comipler Plugin End -->

                        <!-- Tomcat Deployment Plugin Start -->

                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>tomcat-maven-plugin</artifactId>
                            <version>1.1</version>
                            <configuration>
                                <url>${tomcat.url}</url>
                                <username>${tomcat.username}</username>
                                <password>${tomcat.password}</password>
                                <path>/IHMantraCustomer</path>
                                <warFile>target/IHMantraCustomer.war</warFile>
                            </configuration>
                        </plugin>
                        <!-- Tomcat Deployment Plugin End -->
                        <!-- Meta-Inf Folder Missing Solved By Adding Below Plgins. -->
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-war-plugin</artifactId>
                            <version>2.1.1</version>
                            <configuration>
                              <!--webappDirectory>/sample/servlet/container/deploy/directory</webappDirectory-->
                              <packagingExcludes>**/web.xml</packagingExcludes>
                            </configuration>
                        </plugin>
                    </plugins>
            </build>    
        </project>

0 个答案:

没有答案