请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

SpringMVC开发环境验证失败

前面都是按老师的视频配置的,但是到了启动tomcat环节就报下面的错误,请老师帮忙看看,怎么处理哇,一点头绪木有……
以下为server控制台的debug报错信息:

D:\Store\instal\dev\apache-tomcat-9.0.27\bin\catalina.bat run
[2019-11-21 11:14:24,248] Artifact permission:war exploded: Waiting for server connection to start artifact deployment…
Using CATALINA_BASE: "C:\Users\super.IntelliJIdea2019.2\system\tomcat\Unnamed_permission"
Using CATALINA_HOME: "D:\Store\instal\dev\apache-tomcat-9.0.27"
Using CATALINA_TMPDIR: "D:\Store\instal\dev\apache-tomcat-9.0.27\temp"
Using JRE_HOME: "D:\Store\instal\dev\IntelliJ IDEA 2019.2.4\jbr"
Using CLASSPATH: "D:\Store\instal\dev\apache-tomcat-9.0.27\bin\bootstrap.jar;D:\Store\instal\dev\apache-tomcat-9.0.27\bin\tomcat-juli.jar"
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Connected to the target VM, address: ‘127.0.0.1:51435’, transport: 'socket’
21-Nov-2019 23:14:25.148 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.27
21-Nov-2019 23:14:25.152 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建: Oct 7 2019 09:57:22 UTC
21-Nov-2019 23:14:25.152 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
21-Nov-2019 23:14:25.152 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
21-Nov-2019 23:14:25.152 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0
21-Nov-2019 23:14:25.152 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构: amd64
21-Nov-2019 23:14:25.152 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: D:\Store\instal\dev\IntelliJ IDEA 2019.2.4\jbr
21-Nov-2019 23:14:25.153 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本: 11.0.4+10-b304.77
21-Nov-2019 23:14:25.153 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: JetBrains s.r.o
21-Nov-2019 23:14:25.153 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\super.IntelliJIdea2019.2\system\tomcat\Unnamed_permission
21-Nov-2019 23:14:25.153 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\Store\instal\dev\apache-tomcat-9.0.27
21-Nov-2019 23:14:25.155 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
21-Nov-2019 23:14:25.155 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
21-Nov-2019 23:14:25.155 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
21-Nov-2019 23:14:25.155 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\super.IntelliJIdea2019.2\system\tomcat\Unnamed_permission\conf\logging.properties
21-Nov-2019 23:14:25.155 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
21-Nov-2019 23:14:25.155 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51435,suspend=y,server=n
21-Nov-2019 23:14:25.156 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
21-Nov-2019 23:14:25.156 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
21-Nov-2019 23:14:25.156 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
21-Nov-2019 23:14:25.156 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
21-Nov-2019 23:14:25.156 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\super.IntelliJIdea2019.2\system\tomcat\Unnamed_permission\jmxremote.password
21-Nov-2019 23:14:25.156 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\super.IntelliJIdea2019.2\system\tomcat\Unnamed_permission\jmxremote.access
21-Nov-2019 23:14:25.156 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
21-Nov-2019 23:14:25.157 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
21-Nov-2019 23:14:25.157 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
21-Nov-2019 23:14:25.157 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
21-Nov-2019 23:14:25.157 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\super.IntelliJIdea2019.2\system\tomcat\Unnamed_permission
21-Nov-2019 23:14:25.157 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Store\instal\dev\apache-tomcat-9.0.27
21-Nov-2019 23:14:25.157 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\Store\instal\dev\apache-tomcat-9.0.27\temp
21-Nov-2019 23:14:25.157 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0].
21-Nov-2019 23:14:25.158 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
21-Nov-2019 23:14:25.158 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
21-Nov-2019 23:14:25.161 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]
21-Nov-2019 23:14:25.314 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 [“http-nio-8080”]
21-Nov-2019 23:14:25.347 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 [“ajp-nio-8009”]
21-Nov-2019 23:14:25.352 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[400]毫秒内初始化
21-Nov-2019 23:14:25.424 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
21-Nov-2019 23:14:25.424 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
21-Nov-2019 23:14:25.440 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄[“http-nio-8080”]
21-Nov-2019 23:14:25.457 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄[“ajp-nio-8009”]
21-Nov-2019 23:14:25.465 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [113] milliseconds
Connected to server
[2019-11-21 11:14:25,853] Artifact permission:war exploded: Artifact is being deployed, please wait…
21-Nov-2019 23:14:27.212 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
21-Nov-2019 23:14:27.268 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
21-Nov-2019 23:14:27.333 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Thu Nov 21 23:14:27 CST 2019]; root of context hierarchy
21-Nov-2019 23:14:27.380 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [applicationContext.xml]
23:14:27,912 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
23:14:27,912 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
23:14:27,912 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/D:/Dev/Java/permission/target/permission/WEB-INF/classes/logback.xml]
23:14:27,958 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
23:14:27,966 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/D:/Dev/Java/permission/target/permission/WEB-INF/classes/logback.xml]
23:14:27,966 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 1 minutes
23:14:27,968 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
23:14:27,971 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
23:14:27,972 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Encoder has not been set. Cannot invoke its init method.
23:14:27,972 |-ERROR in ch.qos.logback.core.ConsoleAppender[STDOUT] - No encoder set for the appender named “STDOUT”.
23:14:27,977 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@8:18 - no applicable action for [encoder], current ElementPath is [[configuration][encoder]]
23:14:27,977 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@9:21 - no applicable action for [patten], current ElementPath is [[configuration][encoder][patten]]
23:14:27,977 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
23:14:27,977 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
23:14:27,978 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
23:14:27,978 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@33515894 - Registering current configuration as safe fallback point

21-Nov-2019 23:14:28.719 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization completed in 1451 ms
21-Nov-2019 23:14:28.951 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [231] milliseconds.
[2019-11-21 11:14:28,993] Artifact permission:war exploded: Artifact is deployed successfully
[2019-11-21 11:14:28,993] Artifact permission:war exploded: Deploy took 3,140 milliseconds
21-Nov-2019 23:14:35.444 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\Store\instal\dev\apache-tomcat-9.0.27\webapps\manager]
21-Nov-2019 23:14:35.480 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\Store\instal\dev\apache-tomcat-9.0.27\webapps\manager] has finished in [35] ms

正在回答 回答被采纳积分+3

2回答

提问者 qq_精华怀念_0 2019-11-25 21:21:32

输入localhost:8080/test/hello返回404,还请老师帮忙看一下:

我把server-debug-output中的红色提示摘出来贴一下。

25-Nov-2019 21:14:04.312 警告 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure


The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

25-Nov-2019 21:14:04.314 严重 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure


The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED


25-Nov-2019 21:14:01.367 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。

25-Nov-2019 21:14:01.421 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started

25-Nov-2019 21:14:01.481 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Mon Nov 25 21:14:01 CST 2019]; root of context hierarchy

25-Nov-2019 21:14:01.525 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [applicationContext.xml]


The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


Caused by: java.net.ConnectException: Connection refused: connect


25-Nov-2019 21:14:04.318 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

25-Nov-2019 21:14:04.596 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [276] milliseconds.

25-Nov-2019 21:14:04.596 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/permission_war_exploded] startup failed due to previous errors

25-Nov-2019 21:14:04.609 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc Web应用程序 [permission_war_exploded] 注册了JDBC驱动程序 [com.alibaba.druid.proxy.DruidDriver],但在Web应用程序停止时无法注销它。 为防止内存泄漏,JDBC驱动程序已被强制取消注册。

25-Nov-2019 21:14:04.609 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc Web应用程序 [permission_war_exploded] 注册了JDBC驱动程序 [com.mysql.jdbc.Driver],但在Web应用程序停止时无法注销它。 为防止内存泄漏,JDBC驱动程序已被强制取消注册。


0 回复 有任何疑惑可以回复我~
Jimin 2019-11-23 23:16:58

你好,你发的这个里面没看到有任何ERROR的日志啊,而且看这个日志服务也是起来了的,你看一下是日志贴错了?

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_精华怀念_0 #1
    输入localhost:8080/test/hello返回404,还请老师帮忙看一下:
    我把server-debug-output中的红色提示摘出来贴一下。
    由于文字有限制,我把他放到我本提问的答案里面,请参考那里的内容。谢谢。
    回复 有任何疑惑可以回复我~ 2019-11-25 21:22:30
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信