Getting Started with Java Web programming--spring Boot project Build

Source: Internet
Author: User
Tags addchild i18n sendfile java web apache tomcat

1. Clean Project

2. Maven Install

Note: Do not maven clean

BUG:

1. Reference Blog

Tomcat start times wrong, Failed to start component [Standardengine[catalina]. Standardhost[localhost]. Standardcontext

Error log:

22-aug-2017 15:25:34.939 info [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:apache Tom          cat/8.5.1622-aug-2017 15:25:34.945 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Server built: June 17:01:09 utc22-aug-2017 15:25:34.948 info [main] org.apache.catalina.startup.VersionLoggerListener.log Server               number:8.5.16.022-aug-2017 15:25:34.949 info [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 722-aug-2017 15:25:34.951 Info [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version          : 6.122-aug-2017 15:25:34.953 info [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:             amd6422-aug-2017 15:25:34.955 info [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program files\java\jdk1.8.0_101\jre22-aug-2017 15:25:34.957 information [main]        Org.apache.catalina.startup.VersionLoggerListener.log JVM Version:   1.8.0_101-b1322-aug-2017 15:25:34.959 information [main] Org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle corporation22-aug-2017 15:25:34.960 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Catalina_ base:d:\apache-tomcat-8.5.1622-aug-2017 15:25:34.962 information [main] Org.apache.catalina.startup.VersionLoggerListener. Log catalina_home:d:\apache-tomcat-8.5.1622-aug-2017 15:25:34.964 info [main] Org.apache.catalina.startup.VersionLo GgerListener.log Command line argument:-djava.util.logging.config.file=d:\apache-tomcat-8.5.16\conf\ logging.properties22-aug-2017 15:25:34.968 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command Line argument:-djava.util.logging.manager=org.apache.juli.classloaderlogmanager22-aug-2017 15:25:34.971 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-djdk.tls.ephemeraldhkeysize=204822- Aug-2017 15:25:34.973 information [main] Org.apache.catalina.startup.VersionLOggerListener.log Command line argument:-djava.protocol.handler.pkgs=org.apache.catalina.webresources22-aug-2017 15:25:34.976 info [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-dcatalina.base=d : \apache-tomcat-8.5.1622-aug-2017 15:25:34.978 info [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-dcatalina.home=d:\apache-tomcat-8.5.1622-aug-2017 15:25:34.980 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-djava.io.tmpdir=d:\ apache-tomcat-8.5.16\temp22-aug-2017 15:25:34.983 information [main] Org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native Library [1.2.12] Using APR version [1.5.2].22-aug-2017 15:25:34.987 information [main] Org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR Capabilities:ipv6 [true], sendfile [true], accept filters [FALSE], random [true].22-aug-2017 15:25:34.990 information [main] Org.apache.catalina.core.AprLifecycleListener. lifecycleevent Apr/openssl Configuration:useaprconnector [false], Useopenssl [true]22-aug-2017 15:25:35.559 info [main] Org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k Jan 2017]22-aug-2017 15:25:35.663 info [main] org.apache.coyote.AbstractProtocol.init Initializing Protocolhandler [" http-nio-8080 "]22-aug-2017 15:25:35.771 information [main] Org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read22-aug-2017 15:25:35.775 information [main] Org.apache.coyote.AbstractProtocol.init Initializing Protocolhandler ["ajp-nio-8009"]22-aug-2017 15:25:35.779 info [main] Org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/ read22-aug-2017 15:25:35.781 info [main] org.apache.catalina.startup.Catalina.load initialization processed in 1106 ms22-aug-2017 15:25:35.805 information [main] org.apache.catalina.core.StandardService.startInternal starting service [ Catalina]22-aug-2017 15:25:35.807 info [main] org.apache.catalina.core.StandardEngine.startInternal starting Servlet Engine:apache tomcat/8.5.1622-aug-2017 15:25:35.815 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory deploying Web application directory [D:\apache-tomcat-8.5.16 \webapps\docs]22-aug-2017 15:25:36.022 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory Deployment of Web application directory [d:\ Apache-tomcat-8.5.16\webapps\docs] have finished in [206] ms22-aug-2017 15:25:36.026 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory deploying Web application directory [D:\apache-tomcat-8.5.16 \webapps\energyeconomizing]22-aug-2017 15:25:39.662 serious [localhost-startstop-1]  Org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:start: org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standardhost[localhost]. Standardcontext[/energyeconomIzing]]at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:167) at Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:752) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:728) at Org.apache.catalina.core.StandardHost.addChild (standardhost.java:734) at Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1144) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (hostconfig.java:1878) at Java.util.concurrent.executors$runnableadapter.call (executors.java:511) 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:745) caused By:java.lang.IllegalStateException:Unable to complete the scan for annotations for web Applicatio n [/energyeconomizing] due to a stackoverflowerror. Possible root causes include a too loW setting FOR-XSS and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.asn1boolean->org.bouncycastle.asn1.derboolean-> Org.bouncycastle.asn1.asn1boolean]at Org.apache.catalina.startup.ContextConfig.checkHandlesTypes ( contextconfig.java:2110) at Org.apache.catalina.startup.ContextConfig.processAnnotationsStream ( contextconfig.java:2054) at Org.apache.catalina.startup.ContextConfig.processAnnotationsJar (Contextconfig.java : (+) at ORG.APACHE.CATALINA.STARTUP.CONTEXTCONFIG.PROCESSANNOTATIONSURL (contextconfig.java:1970) at Org.apache.catalina.startup.ContextConfig.processAnnotations (contextconfig.java:1923) at Org.apache.catalina.startup.ContextConfig.webConfig (contextconfig.java:1163) at Org.apache.catalina.startup.ContextConfig.configureStart (contextconfig.java:775) at Org.apache.catalina.startup.ContextConfig.lifecycleEvent (contextconfig.java:299) at Org.apache.catalina.util.LifecycleBase.fireLifecycleEvent (lifecyclebase.java:94) at Org.Apache.catalina.core.StandardContext.startInternal (standardcontext.java:5105) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150) ... Ten more22-aug-2017 15:25:39.666 serious [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory Error deploying Web application directory [D:\apache-tomcat-8.5.16\webapps\energyEconomizing] Java.lang.IllegalStateException:ContainerBase.addChild:start:org.apache.catalina.LifecycleException:Failed to Start component [Standardengine[catalina]. Standardhost[localhost]. Standardcontext[/energyeconomizing]]at org.apache.catalina.core.ContainerBase.addChildInternal ( containerbase.java:756) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:728) at Org.apache.catalina.core.StandardHost.addChild (standardhost.java:734) at Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1144) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (hostconfig.java:1878) at java.util.concurrent.executors$Runnableadapter.call (executors.java:511) 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:745) 22-aug-2017 15:25:39.677 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory Deployment of Web application directory [d:\ Apache-tomcat-8.5.16\webapps\energyeconomizing] have finished in [3,650] ms22-aug-2017 15:25:39.689 information [ LOCALHOST-STARTSTOP-1] org.apache.catalina.startup.HostConfig.deployDirectory deploying Web application directory [D : \apache-tomcat-8.5.16\webapps\examples]22-aug-2017 15:25:39.863 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory Deployment of Web application directory [d:\ Apache-tomcat-8.5.16\webapps\examples] have finished in [174] ms22-aug-2017 15:25:39.867 information [localhost-startstop-1] Org.apache.catalina.sTartup. Hostconfig.deploydirectory deploying Web application directory [d:\apache-tomcat-8.5.16\webapps\host-manager]22- Aug-2017 15:25:39.891 information [localhost-startstop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of Web application directory [D:\apache-tomcat-8.5.16\webapps\host-manager] have finished in [] ms22-aug-2017 15:25:39.894 information [localhost-startstop-1] org.apache.catalina.startup.HostConfig.deployDirectory deploying web application directory [d:\apache-tomcat-8.5.16\webapps\manager]22-aug-2017 15:25:39.913 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory Deployment of Web application directory [d:\ Apache-tomcat-8.5.16\webapps\manager] have finished in [ms22-aug-2017] 15:25:39.917 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig.deployDirectory deploying Web application directory [D:\apache-tomcat-8.5.16 \webapps\root]22-aug-2017 15:25:39.934 information [localhost-startstop-1] Org.apache.catalina.startup.HostConfig. deploydirectory Deployment of Web application directory [D:\apache-tomcat-8.5.16\webapps\ROOT] have finished in [] Ms22 -aug-2017 15:25:39.941 information [main] Org.apache.coyote.AbstractProtocol.start starting Protocolhandler ["http-nio-8080"] 22-aug-2017 15:25:39.951 information [main] Org.apache.coyote.AbstractProtocol.start starting Protocolhandler ["ajp-nio-8009"] 22-aug-2017 15:25:39.956 info [main] org.apache.catalina.startup.Catalina.start Server startup in 4167 ms22-aug-2017 15:31 : 01.249 info [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:apache tomcat/8.5.1622-aug- 2017 15:31:01.255 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Server Built:jun 21 2017 17:01 : utc22-aug-2017 15:31:01.256 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Server number:8.5 .16.022-aug-2017 15:31:01.258 Info [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:windo WS 722-aug-2017 15:31:01.260 information [main] Org.apache.catalina.startup.VersionLoggerListener.log OS version:6.122-aug-2017 15:31:01.261 information [main] Org.ap Ache.catalina.startup.VersionLoggerListener.log architecture:amd6422-aug-2017 15:31:01.263 information [main] Org.apache. Catalina.startup.VersionLoggerListener.log Java home:c:\program files\java\jdk1.8.0_101\jre22-aug-2017 15:31: 01.265 info [main] org.apache.catalina.startup.VersionLoggerListener.log JVM version:1.8.0_101-b1322-aug-2017 15: 31:01.266 info [main] org.apache.catalina.startup.VersionLoggerListener.log JVM vendor:oracle corporation22-aug- 2017 15:31:01.268 information [main] Org.apache.catalina.startup.VersionLoggerListener.log catalina_base:d:\apache-tomcat- 8.5.1622-aug-2017 15:31:01.270 info [main] org.apache.catalina.startup.VersionLoggerListener.log catalina_home:d:\a pache-tomcat-8.5.1622-aug-2017 15:31:01.272 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command Line argument:-djava.util.logging.config.file=d:\apache-tomcat-8.5.16\conf\logging.properties22-aug-2017 15:31:01.275 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-djava.util.logging.manager= org.apache.juli.classloaderlogmanager22-aug-2017 15:31:01.277 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-djdk.tls.ephemeraldhkeysize=204822- Aug-2017 15:31:01.279 info [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:- djava.protocol.handler.pkgs=org.apache.catalina.webresources22-aug-2017 15:31:01.283 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-dcatalina.base=d:\ apache-tomcat-8.5.1622-aug-2017 15:31:01.286 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-dcatalina.home=d:\apache-tomcat-8.5.1622-aug-2017 15:31:01.288 information [main] Org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-djava.io.tmpdir=d:\apache-tomcat-8.5.16\temp22-aug-2017 15:31:01.291 information [main] Org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apr based Apache Tomcat Native Library [1.2.12] using APR version [1.5.2].22-aug-2017 15:31:01.294 info [main] Org.ap Ache.catalina.core.AprLifecycleListener.lifecycleEvent APR Capabilities:ipv6 [true], sendfile [true], accept filters [ FALSE], random [true].22-aug-2017 15:31:01.297 information [main] Org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Apr/openssl Configuration:useaprconnector [false], Useopenssl [true]22-aug-2017 15:31:01.869 info [main] Org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k Jan 2017]22-aug-2017 15:31:01.973 info [main] Org.apache.coyote.Abstrac Tprotocol.init Initializing Protocolhandler ["http-nio-8080"]22-aug-2017 15:31:02.076 info [main] Org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/ read22-aug-2017 15:31:02.080 information [main] org. apache.coyote.AbstractProtocol.init Initializing Protocolhandler ["ajp-nio-8009"]22-aug-2017 15:31:02.084 info [main] Org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/ read22-aug-2017 15:31:02.087 info [main] org.apache.catalina.startup.Catalina.load initialization processed in 1110 ms

Workaround: Modify the Tomcat configuration file catalina.properties, add after tomcat.util.scan.StandardJarScanFilter.jarsToSkip ", * "

As follows:

#-Test JARs (JUnit, Cobertura and dependencies) Tomcat.util.scan.standardjarscanfilter.jarstoskip=bootstrap.jar, Commons-daemon.jar,tomcat-juli.jar,annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar, Websocket-api.jar,jaspic-api.jar,catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar, Catalina-tribes.jar,jasper.jar,jasper-el.jar,ecj-*.jar,tomcat-api.jar,tomcat-util.jar,tomcat-util-scan.jar, Tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-jni.jar,tomcat-websocket.jar,tomcat-i18n-en.jar,tomcat-i18n-es.jar, Tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar, Tomcat-jdbc.jar,tools.jar,commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,commons-dbcp*.jar , Commons-digester*.jar,commons-fileupload*.jar,commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar, Commons-logging*.jar,commons-math*.jar,commons-pool*.jar,jstl.jar,taglibs-standard-spec-*.jar, Geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*. jar,xercesimpl.jar,xmlparserapis.jar,xml-apis.jar,junit.jar,junit-*.jar,hamcrest-*.jar,easymock-*.jar,cglib-*. Jar,objenesis-*.jar,ant-launcher.jar,cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar, jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlparserapis-*.jar,xom-*.jar,*

Getting Started with Java Web programming--spring Boot project Build

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.