2 fnzf14428547 fnzf14428547 于 2016.03.08 15:41 提问

项目启动失败了,大神看看是哪里的问题

下面是报错信息和springmvc的配置

 jackson-mapper-asl严重: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Quartz-spring]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1245)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1895)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name SpringMVC
    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3320)
    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3299)
    at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1438)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1357)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5412)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more
2016-3-8 15:19:07 org.apache.catalina.startup.HostConfig deployDirectory
严重: Error deploying web application directory G:\apache-tomcat-7.0.59\webapps\Quartz-spring
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Quartz-spring]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1245)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1895)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
2016-3-8 15:19:07 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory G:\apache-tomcat-7.0.59\webapps\Quartz-spring has finished in 3,484 ms
2016-3-8 15:19:07 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0">
    <display-name>Archetype Created Web Application</display-name>
    <context-param>
        <param-name>webAppRootKey</param-name>
        <param-value>webApp.root</param-value>
    </context-param>       
    <!-- Spring和mybatis的配置文件 -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value> 
        /WEB-INF/config/spring-mybatis.xml,
        /WEB-INF/config/applicationContext.xml        
        </param-value>
    </context-param>    
     <!-- 编码过滤器 -->
    <filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <async-supported>true</async-supported>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>    
     <!-- Spring监听器 -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>     
    <!-- 防止Spring内存溢出监听器 -->
    <listener>
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>     
     <!-- Spring MVC servlet -->
    <servlet>
        <servlet-name>SpringMVC</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/config/spring-mvc.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
        <async-supported>true</async-supported>
    </servlet>
    <servlet-mapping>
        <servlet-name>SpringMVC</servlet-name>        
         <!-- 此处可以可以配置成*.do,对应struts的后缀习惯 -->
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>/index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

5个回答

devmiao
devmiao   Ds   Rxr 2016.03.08 15:49
fnzf14428547
fnzf14428547 喵大神他的错误和我的不一样啊,我看了下路径什么的都没错啊
接近 2 年之前 回复
Royal_lr
Royal_lr   Ds   Rxr 2016.03.08 16:03

an unknown servlet name,,未知的servlet名,,

fnzf14428547
fnzf14428547 回复Royal_lr: 贴出来了
接近 2 年之前 回复
Royal_lr
Royal_lr 回复fnzf14428547: 看下 web.xml
接近 2 年之前 回复
fnzf14428547
fnzf14428547 怎么解决呢
接近 2 年之前 回复
wangkang80
wangkang80   2016.03.08 16:09

关于spring,spring mvc,quartz的详细配置,可参考 : http://git.oschina.net/wangkang/llsfw

希望能够帮到你.

gaint111
gaint111   2016.03.08 16:13

应该是配置了一个定时任务,配置的有问题吧

fnzf14428547
fnzf14428547 Quartz-spring是我的工程名,我的定时任务没在springmvc里面写啊
接近 2 年之前 回复
Yiran8935
Yiran8935   2016.03.08 16:18

你项目名是Quartz-spring么?

Yiran8935
Yiran8935 回复fnzf14428547: 刚才试着配了下 根据网上大神的做法很容易就配成定时job了你的问题现在解决了么
接近 2 年之前 回复
Yiran8935
Yiran8935 回复fnzf14428547: 前两个熟悉,job定时用过没自己配过,今天没事的时候配试试
接近 2 年之前 回复
fnzf14428547
fnzf14428547 你对springmvc+mybatis+quartz熟悉不
接近 2 年之前 回复
Yiran8935
Yiran8935 找大神们看看
接近 2 年之前 回复
fnzf14428547
fnzf14428547 还是那样哎,没办法了
接近 2 年之前 回复
fnzf14428547
fnzf14428547 回复Yiran8935: 我看看,查找一下
接近 2 年之前 回复
Yiran8935
Yiran8935 是不是tomcat里面的文件夹对这个项目造成影响了
接近 2 年之前 回复
Yiran8935
Yiran8935 http://bbs.csdn.net/topics/390815859
接近 2 年之前 回复
Yiran8935
Yiran8935 http://bbs.csdn.net/topics/390815859
接近 2 年之前 回复
Yiran8935
Yiran8935 你这些信息放的有点少,感觉无从下手
接近 2 年之前 回复
fnzf14428547
fnzf14428547 回复Yiran8935:比我厉害的都是大神, 请问有办法解决这个问题吗?
接近 2 年之前 回复
Yiran8935
Yiran8935 回复fnzf14428547: 我不是大神我也是菜鸟,,一起学习
接近 2 年之前 回复
fnzf14428547
fnzf14428547 大神又看到你了,上次解决我的问题,我还记得你
接近 2 年之前 回复
fnzf14428547
fnzf14428547 对的
接近 2 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!