V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xjtlujoe
V2EX  ›  问与答

Idea 下的 SpringMVC 问题

  •  
  •   xjtlujoe · 2017-04-19 15:56:22 +08:00 · 1474 次点击
    这是一个创建于 2775 天前的主题,其中的信息可能已经有所发展或是发生改变。

    网上看教程弄了个 helloworld 试了一下,一直不行,搜了好多地方都没有解决问题。。。求解。。

    环境: Mac , IDEA , tomcat9 , SpringMVC

    /usr/local/apache-tomcat-9.0.0.M19/bin/catalina.sh run
    [2017-04-19 03:33:58,620] Artifact SpringHelloWorld:war exploded: Server is not connected. Deploy is not available.
    19-Apr-2017 15:34:00.441 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/9.0.0.M19
    19-Apr-2017 15:34:00.444 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Mar 27 2017 12:09:59 UTC
    19-Apr-2017 15:34:00.444 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         9.0.0.0
    19-Apr-2017 15:34:00.444 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Mac OS X
    19-Apr-2017 15:34:00.444 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.11.6
    19-Apr-2017 15:34:00.444 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          x86_64
    19-Apr-2017 15:34:00.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
    19-Apr-2017 15:34:00.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_121-b13
    19-Apr-2017 15:34:00.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
    19-Apr-2017 15:34:00.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /Users/Spike/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_SpringHelloWorld_2
    19-Apr-2017 15:34:00.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/apache-tomcat-9.0.0.M19
    19-Apr-2017 15:34:00.447 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/Spike/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_SpringHelloWorld_2/conf/logging.properties
    19-Apr-2017 15:34:00.447 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    19-Apr-2017 15:34:00.449 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
    19-Apr-2017 15:34:00.449 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=8099
    19-Apr-2017 15:34:00.449 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
    19-Apr-2017 15:34:00.449 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
    19-Apr-2017 15:34:00.449 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
    19-Apr-2017 15:34:00.450 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
    19-Apr-2017 15:34:00.450 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
    19-Apr-2017 15:34:00.450 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/Spike/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_SpringHelloWorld_2
    19-Apr-2017 15:34:00.450 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/apache-tomcat-9.0.0.M19
    19-Apr-2017 15:34:00.450 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/apache-tomcat-9.0.0.M19/temp
    19-Apr-2017 15:34:00.450 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/Spike/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
    19-Apr-2017 15:34:00.890 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
    19-Apr-2017 15:34:00.935 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
    19-Apr-2017 15:34:00.939 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
    19-Apr-2017 15:34:00.941 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
    19-Apr-2017 15:34:00.942 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1385 ms
    19-Apr-2017 15:34:01.012 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
    19-Apr-2017 15:34:01.014 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.0.M19
    19-Apr-2017 15:34:01.025 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
    19-Apr-2017 15:34:01.039 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
    19-Apr-2017 15:34:01.043 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 100 ms
    Connected to server
    [2017-04-19 03:34:01,307] Artifact SpringHelloWorld:war exploded: Artifact is being deployed, please wait...
    [2017-04-19 03:34:01,351] Artifact SpringHelloWorld:war exploded: Error during artifact deployment. See server log for details.
    19-Apr-2017 15:34:11.031 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor /Users/Spike/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_SpringHelloWorld_2/conf/Catalina/localhost/ROOT.xml
    19-Apr-2017 15:34:13.427 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 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.
    19-Apr-2017 15:34:13.527 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
    19-Apr-2017 15:34:13.670 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Wed Apr 19 15:34:13 CST 2017]; root of context hierarchy
    19-Apr-2017 15:34:13.768 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
    19-Apr-2017 15:34:14.084 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization completed in 557 ms
    19-Apr-2017 15:34:14.142 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization started
    19-Apr-2017 15:34:14.167 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Wed Apr 19 15:34:14 CST 2017]; parent: Root WebApplicationContext
    19-Apr-2017 15:34:14.168 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
    19-Apr-2017 15:34:14.719 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
    19-Apr-2017 15:34:14.915 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Wed Apr 19 15:34:14 CST 2017]; parent: Root WebApplicationContext
    19-Apr-2017 15:34:15.017 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Wed Apr 19 15:34:14 CST 2017]; parent: Root WebApplicationContext
    19-Apr-2017 15:34:15.088 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization completed in 946 ms
    19-Apr-2017 15:34:15.104 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor /Users/Spike/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_SpringHelloWorld_2/conf/Catalina/localhost/ROOT.xml has finished in 4,073 ms
    19-Apr-2017 15:34:15.106 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/apache-tomcat-9.0.0.M19/webapps/manager
    19-Apr-2017 15:34:15.164 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/apache-tomcat-9.0.0.M19/webapps/manager has finished in 58 ms
    19-Apr-2017 15:40:38.720 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
    19-Apr-2017 15:40:38.724 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
    19-Apr-2017 15:40:38.788 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
    19-Apr-2017 15:40:38.843 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
    19-Apr-2017 15:40:38.850 INFO [main] org.springframework.web.context.support.XmlWebApplicationContext.doClose Closing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Wed Apr 19 15:34:14 CST 2017]; parent: Root WebApplicationContext
    19-Apr-2017 15:40:38.855 INFO [main] org.springframework.web.context.support.XmlWebApplicationContext.doClose Closing Root WebApplicationContext: startup date [Wed Apr 19 15:34:13 CST 2017]; root of context hierarchy
    19-Apr-2017 15:40:38.900 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
    19-Apr-2017 15:40:38.903 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
    19-Apr-2017 15:40:38.905 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
    19-Apr-2017 15:40:38.906 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
    Disconnected from server
    
    3 条回复    2017-04-22 08:56:53 +08:00
    LichMscy
        1
    LichMscy  
       2017-04-19 16:49:40 +08:00
    Ouyangan
        2
    Ouyangan  
       2017-04-19 18:58:27 +08:00   ❤️ 1
    [2017-04-19 03:34:01,351] Artifact SpringHelloWorld:war exploded: Error during artifact deployment. See server log for details.

    把这个日志贴出来 .
    xjtlujoe
        3
    xjtlujoe  
    OP
       2017-04-22 08:56:53 +08:00
    是自己的问题,要一步一步来, idea 真是神器。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   943 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:56 · PVG 04:56 · LAX 12:56 · JFK 15:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.