日志显示没有成功初始化servlet 'Spring-mvc',怎么办?

日志显示没有成功初始化servlet 'Spring-mvc',怎么办?

D:\apache-tomcat-8.5.85\bin\catalina.bat run
[2023-02-08 05:36:53,620] Artifact reader:Web exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE:   "C:\Users\eyton\AppData\Local\JetBrains\IntelliJIdea2022.1\tomcat\5662a4ca-840f-4c61-8c99-a17ac9d33af0"
Using CATALINA_HOME:   "D:\apache-tomcat-8.5.85"
Using CATALINA_TMPDIR: "D:\apache-tomcat-8.5.85\temp"
Using JRE_HOME:        "C:\software\Java\jdk-17.0.4.1"
Using CLASSPATH:       "D:\apache-tomcat-8.5.85\bin\bootstrap.jar;D:\apache-tomcat-8.5.85\bin\tomcat-juli.jar"
Using CATALINA_OPTS:   ""
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.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Connected to the target VM, address: '127.0.0.1:53100', transport: 'socket'
08-Feb-2023 05:36:54.540 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.85
08-Feb-2023 05:36:54.542 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 11 2023 00:09:15 UTC
08-Feb-2023 05:36:54.542 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.85.0
08-Feb-2023 05:36:54.542 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 11
08-Feb-2023 05:36:54.543 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0
08-Feb-2023 05:36:54.543 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
08-Feb-2023 05:36:54.543 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\software\Java\jdk-17.0.4.1
08-Feb-2023 05:36:54.544 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           17.0.4.1+1-LTS-2
08-Feb-2023 05:36:54.544 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
08-Feb-2023 05:36:54.544 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\eyton\AppData\Local\JetBrains\IntelliJIdea2022.1\tomcat\5662a4ca-840f-4c61-8c99-a17ac9d33af0
08-Feb-2023 05:36:54.544 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         D:\apache-tomcat-8.5.85
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\eyton\AppData\Local\JetBrains\IntelliJIdea2022.1\tomcat\5662a4ca-840f-4c61-8c99-a17ac9d33af0\conf\logging.properties
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53100,suspend=y,server=n
08-Feb-2023 05:36:54.545 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\software\IntelliJIDEA2022.1\plugins\java\lib\rt\debugger-agent.jar
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\eyton\AppData\Local\JetBrains\IntelliJIdea2022.1\tomcat\5662a4ca-840f-4c61-8c99-a17ac9d33af0\jmxremote.password
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\eyton\AppData\Local\JetBrains\IntelliJIdea2022.1\tomcat\5662a4ca-840f-4c61-8c99-a17ac9d33af0\jmxremote.access
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
08-Feb-2023 05:36:54.546 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
08-Feb-2023 05:36:54.547 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\eyton\AppData\Local\JetBrains\IntelliJIdea2022.1\tomcat\5662a4ca-840f-4c61-8c99-a17ac9d33af0
08-Feb-2023 05:36:54.547 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\apache-tomcat-8.5.85
08-Feb-2023 05:36:54.547 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-8.5.85\temp
08-Feb-2023 05:36:54.547 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [C:\software\Java\jdk-17.0.4.1\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\software\mysql-5.7.24-winx64\bin;C:\Program Files\dotnet\;C:\Users\eyton\AppData\Local\Microsoft\WindowsApps;C:\software\Java\jdk-17.0.4.1\bin;;.]
08-Feb-2023 05:36:54.584 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
08-Feb-2023 05:36:54.603 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 430 ms
08-Feb-2023 05:36:54.650 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
08-Feb-2023 05:36:54.650 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.85]
08-Feb-2023 05:36:54.667 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
08-Feb-2023 05:36:54.715 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 111 ms
Connected to server
[2023-02-08 05:36:54,918] Artifact reader:Web exploded: Artifact is being deployed, please wait...
08-Feb-2023 05:36:55.215 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [5.0]. Default version will be used.
08-Feb-2023 05:36:56.205 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2023-02-08 05:36:56,356] Artifact reader:Web exploded: Artifact is deployed successfully
[2023-02-08 05:36:56,356] Artifact reader:Web exploded: Deploy took 1,438 milliseconds
08-Feb-2023 05:37:04.683 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\apache-tomcat-8.5.85\webapps\manager]
08-Feb-2023 05:37:04.737 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\apache-tomcat-8.5.85\webapps\manager] has finished in [52] ms


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

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕小蓝 2023-02-08 14:03:47

同学你好,同学提供日志展示的是项目部署的过程,并且项目已经成功部署到服务器了。老师并没有看到同学描述的“没有成功初始化”的情况。

同学可以使用这个环境进行编码尝试一下,如果有报错的话,提供一下报错信息。

祝学习愉快~

  • 提问者 weixin_慕哥3142670 #1

    小蓝你好,是这样的。因为在教学视频最后那里老师说要日志显示下面这两句话才算是成功:

    https://img1.sycdn.imooc.com//climg/63e34ff709f792c604710062.jpg

    2023-02-08 15:32:30
  • 提问者 weixin_慕哥3142670 #2

    但我的日志里没有显示这两句话,所以我以为是出现什么问题了。https://img1.sycdn.imooc.com//climg/63e34ff709f792c604710062.jpg

    2023-02-08 15:33:28
  • 同学你好,同学提供的日志中,没有与SpringMVC相关的信息,老师这边也无法确定是日志的原因还是SpringMVC并没有成功引入。

    建议同学检查一下依赖列表,查看一下是否将SpringMVC的依赖成功引入了。

    如果依赖引入成功,可以检查一下web.xml中SpringMVC的配置是否正确。

    通常上面两点正确无误的话,就可以正常使用,不是必须要在日志有所体现。同学可以参考后面的课程,写一段代码测试一下。

    祝学习愉快~

    2023-02-08 15:51:50
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师