The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:[D:\javalea\javalearning\jdk8\bin;…
1.下载 tcnative-1.dll,放在tomcat的bin目录下,没有解决问题,copy一份放在jdk的bin目录下也还是报错;
2.又注意到console中异常信息:
Description:
An attempt was made to call the method javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String; but it does not exist.
发现tomcat-7中ServletContext中没有getVirtualServerName()方法:
发现tomcat-8中有ServletContext.getVirtualServerName()方法:
3.将tomcat-8引入项目中,启动成功
D:\javalea\javalearning\jdk8\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=53011 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\JAVA\TOOL\IDE\IntelliJ IDEA 2018.1.5\lib\idea_rt.jar=53012:D:\JAVA\TOOL\IDE\IntelliJ IDEA 2018.1.5\bin" -Dfile.encoding=UTF-8 -classpath D:\javalea\javalearning\jdk8\jre\lib\charsets.jar;D:\javalea\javalearning\jdk8\jre\lib\deploy.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\access-bridge-64.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\cldrdata.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\dnsns.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\jaccess.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\jfxrt.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\localedata.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\nashorn.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\servlet-api.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\sunec.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\sunjce_provider.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\sunmscapi.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\sunpkcs11.jar;D:\javalea\javalearning\jdk8\jre\lib\ext\zipfs.jar;D:\javalea\javalearning\jdk8\jre\lib\javaws.jar;D:\javalea\javalearning\jdk8\jre\lib\jce.jar;D:\javalea\javalearning\jdk8\jre\lib\jfr.jar;D:\javalea\javalearning\jdk8\jre\lib\jfxswt.jar;D:\javalea\javalearning\jdk8\jre\lib\jsse.jar;D:\javalea\javalearning\jdk8\jre\lib\management-agent.jar;D:\javalea\javalearning\jdk8\jre\lib\plugin.jar;D:\javalea\javalearning\jdk8\jre\lib\resources.jar;D:\javalea\javalearning\jdk8\jre\lib\rt.jar;D:\Idea_work\hello\target\classes;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot-starter-web\2.0.5.RELEASE\spring-boot-starter-web-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot-starter\2.0.5.RELEASE\spring-boot-starter-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot-starter-logging\2.0.5.RELEASE\spring-boot-starter-logging-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\javalea\Project_2\babasportMaven\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\javalea\Project_2\babasportMaven\repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;D:\javalea\Project_2\babasportMaven\repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;D:\javalea\Project_2\babasportMaven\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\javalea\Project_2\babasportMaven\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\javalea\Project_2\babasportMaven\repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot-starter-json\2.0.5.RELEASE\spring-boot-starter-json-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;D:\javalea\Project_2\babasportMaven\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\javalea\Project_2\babasportMaven\repository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;D:\javalea\Project_2\babasportMaven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.6\jackson-datatype-jdk8-2.9.6.jar;D:\javalea\Project_2\babasportMaven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.6\jackson-datatype-jsr310-2.9.6.jar;D:\javalea\Project_2\babasportMaven\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.6\jackson-module-parameter-names-2.9.6.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.5.RELEASE\spring-boot-starter-tomcat-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.34\tomcat-embed-core-8.5.34.jar;D:\javalea\Project_2\babasportMaven\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.34\tomcat-embed-el-8.5.34.jar;D:\javalea\Project_2\babasportMaven\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.34\tomcat-embed-websocket-8.5.34.jar;D:\javalea\Project_2\babasportMaven\repository\org\hibernate\validator\hibernate-validator\6.0.12.Final\hibernate-validator-6.0.12.Final.jar;D:\javalea\Project_2\babasportMaven\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\javalea\Project_2\babasportMaven\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\javalea\Project_2\babasportMaven\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-web\5.0.9.RELEASE\spring-web-5.0.9.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-beans\5.0.9.RELEASE\spring-beans-5.0.9.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-webmvc\5.0.9.RELEASE\spring-webmvc-5.0.9.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-aop\5.0.9.RELEASE\spring-aop-5.0.9.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-context\5.0.9.RELEASE\spring-context-5.0.9.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-expression\5.0.9.RELEASE\spring-expression-5.0.9.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot-devtools\2.0.5.RELEASE\spring-boot-devtools-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot\2.0.5.RELEASE\spring-boot-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\boot\spring-boot-autoconfigure\2.0.5.RELEASE\spring-boot-autoconfigure-2.0.5.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-core\5.0.9.RELEASE\spring-core-5.0.9.RELEASE.jar;D:\javalea\Project_2\babasportMaven\repository\org\springframework\spring-jcl\5.0.9.RELEASE\spring-jcl-5.0.9.RELEASE.jar com.snow.hello.HelloApplication
21:31:40.749 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
21:31:40.754 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/, /spring-boot/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter/target/classes/]
21:31:40.755 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/D:/Idea_work/hello/target/classes/]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.5.RELEASE)
2018-10-01 21:31:41.521 INFO 3776 --- [ restartedMain] com.snow.hello.HelloApplication : Starting HelloApplication on ASUS with PID 3776 (D:\Idea_work\hello\target\classes started by 张 迪 in D:\WORK\github\gitcode)
2018-10-01 21:31:41.526 INFO 3776 --- [ restartedMain] com.snow.hello.HelloApplication : No active profile set, falling back to default profiles: default
2018-10-01 21:31:41.727 INFO 3776 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@76c62281: startup date [Mon Oct 01 21:31:41 CST 2018]; root of context hierarchy
2018-10-01 21:31:44.268 INFO 3776 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2018-10-01 21:31:44.300 INFO 3776 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-10-01 21:31:44.301 INFO 3776 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.34
2018-10-01 21:31:44.308 INFO 3776 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : Loaded APR based Apache Tomcat Native library [1.2.17] using APR version [1.6.3].
2018-10-01 21:31:44.308 INFO 3776 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2018-10-01 21:31:44.308 INFO 3776 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2018-10-01 21:31:45.690 INFO 3776 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.0.2o 27 Mar 2018]
2018-10-01 21:31:46.050 ERROR 3776 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase : A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.8.0_151]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) [na:1.8.0_151]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410) [tomcat-embed-core-8.5.34.jar:8.5.34]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 8 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1181) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 10 common frames omitted
2018-10-01 21:31:46.055 ERROR 3776 --- [ restartedMain] org.apache.catalina.core.ContainerBase : A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_151]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_151]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:366) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:86) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:413) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) [spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:333) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at com.snow.hello.HelloApplication.main(HelloApplication.java:10) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.5.RELEASE.jar:2.0.5.RELEASE]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_151]
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:950) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 6 common frames omitted
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_151]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_151]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
... 8 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 8 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1181) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.34.jar:8.5.34]
... 10 common frames omitted
2018-10-01 21:31:46.057 INFO 3776 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2018-10-01 21:31:46.061 WARN 3776 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2018-10-01 21:31:46.084 INFO 3776 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-10-01 21:31:46.097 ERROR 3776 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call the method javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String; but it does not exist. Its class, javax.servlet.ServletContext, is available from the following locations:
jar:file:/D:/javalea/javalearning/jdk8/jre/lib/ext/servlet-api.jar!/javax/servlet/ServletContext.class
jar:file:/D:/javalea/javalearning/jdk8/jre/lib/ext/servlet-api.jar!/javax/servlet/ServletContext.class
jar:file:/D:/javalea/Project_2/babasportMaven/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.34/tomcat-embed-core-8.5.34.jar!/javax/servlet/ServletContext.class
It was loaded from the following location:
file:/D:/javalea/javalearning/jdk8/jre/lib/ext/servlet-api.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of javax.servlet.ServletContext
Process finished with exit code 0
http://tomcat.apache.org/tomcat-7.0-doc/apr.html
tcnative-1.dll
下载地址:https://tomcat.apache.org/download-native.cgi
参考:https://blog.csdn.net/typist_/article/details/52824265