springmvc-springMVC项目启动报错

问题描述

springMVC项目启动报错

springMVC 项目启动,出现奇怪问题,已经耽误好几天,求大神帮忙!

严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/h5Platform]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1122)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
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:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/h5Platform]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/servlet/ServletContext"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1229)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1692)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5520)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more

解决方案

这是web.xml

<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
Archetype Created Web Application

<!-- 读取spring配置文件 -->
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:conf/spring.xml;
        classpath:conf/spring-mybatis.xml
    </param-value>
</context-param>
<!-- 设计路径变量值 -->
<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>springmvc.root</param-value>
</context-param>

<!-- Spring字符集过滤器 -->
<filter>
    <filter-name>SpringEncodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
        <param-name>forceEncoding</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>GBK</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>SpringEncodingFilter</filter-name>
    <url-pattern>*</url-pattern>
</filter-mapping>

<!-- 日志记录 -->
<context-param>
    <!-- 日志配置文件路径 -->
    <param-name>log4jConfigLocation</param-name>
    <param-value>classpath:conf/log4j.properties</param-value>
</context-param>
<context-param>
    <!-- 日志页面的刷新间隔 -->
    <param-name>log4jRefreshInterval</param-name>
    <param-value>6000</param-value>
</context-param>
<listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!-- springMVC核心配置 -->
<servlet>
    <servlet-name>spring</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:conf/spring-mvc.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>spring</servlet-name>
    <url-pattern>*.do</url-pattern>
</servlet-mapping>

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<!-- 错误跳转页面 -->
<error-page>
    <!-- 路径不正确 -->
    <error-code>404</error-code>
    <location>/WEB-INF/errorpage/404.jsp</location>
</error-page>
<error-page>
    <!-- 没有访问权限,访问被禁止 -->
    <error-code>405</error-code>
    <location>/WEB-INF/errorpage/405.jsp</location>
</error-page>
<error-page>
    <!-- 内部错误 -->
    <error-code>500</error-code>
    <location>/WEB-INF/errorpage/500.jsp</location>
</error-page>

解决方案二:

项目启动报错
maven项目启动报错
项目启动报错:SEVERE: Exception starting filter struts2

时间: 2024-11-10 00:31:42

springmvc-springMVC项目启动报错的相关文章

spring mvc-SSH的SpringMVC项目启动报错 百度说是缺少Jar包导入之后还是不行 下面是报错代码

问题描述 SSH的SpringMVC项目启动报错 百度说是缺少Jar包导入之后还是不行 下面是报错代码 严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': BeanPostP

spring mvc-springmvc项目启动报错

问题描述 springmvc项目启动报错 报错如上 我按照网上的方法清空了 好多缓存文件之列的 但是没有用啊!! 上图自动咋生成了 spring_mvc.xml文件呢? 有没有知道的大神!!! 解决方案 后来重新试了一下 原来是 Dynastic web project 的名称命名问题 项目发布到tomcat上后 在 config/Catalina/localhost/目录下会生成和 项目名称一样的xml文件哦 错就错在我之前 给springMVC项目起名字的时候 写成了 spring MVC

项目启动报oracle错-项目启动报错,在网上查了好多资料还是为解决,求高手帮忙

问题描述 项目启动报错,在网上查了好多资料还是为解决,求高手帮忙 [14:22:13] [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] WARN - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@11765ae -- Acquisition Attempt Failed!!! Clearing pending acquires. While t

急,关于项目启动报错的问题

问题描述 急,关于项目启动报错的问题 是这样的,有a,b两个分项目,b项目是主项目然后在myeclipse中b项目build path引入了a项目然后b的类中可以引入a的类,直接在java文件最上面写import就行,但是b的spring.xml无法读取到a项目的spring.xml等xml文件(就是在b的xml中import的a的xml无法连接到)启动时报错,报找不到那个a的xml的错误 解决方案 Spring MVC项目启动报错信息__待解决关于项目启动报错一些新手问题weblogic启动项

jboss-JBoss部署web项目启动报错

问题描述 JBoss部署web项目启动报错 JBoss6.0 final,没有项目时正常启动,部署项目就会报错 20:07:12,070 INFO [AbstractJBossASServerBase] Server Configuration: JBOSS_HOME URL: file:/F:/DevelopTools/jboss-6.0.0.Final/ Bootstrap: $JBOSS_HOMEserver/default/conf/bootstrap.xml Common Base:

java-jboss7部署web项目启动报错,劳驾高手指点

问题描述 jboss7部署web项目启动报错,劳驾高手指点 16:25:27,433 ERROR org.jboss.msc.service.fail MSC0000 1: Failed to start service jboss.deployment.unit."edup.war".POST_MODULE: org.jbo ss.msc.service.StartException in service jboss.deployment.unit."edup.war&qu

tomcat部署一个新项目启动报错,老项目可以正常启动

问题描述 tomcat部署一个新项目启动报错,老项目可以正常启动 CompilerOracle: exclude org/hibernate/cfg/annotations/SimpleValueBinder.setType 2014-12-29 10:52:52 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.20. 2014-12-

eclipse tomcat项目启动报错

问题描述 eclipse tomcat项目启动报错 [12 21:38:11,361 INFO ] [localhost-startStop-1] annotation.ClassPathBeanDefinitionScanner - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning [12 21:38:12,168 INFO ] [localhost-startStop-1] xm

项目启动报错-linux系统tomcat重启报错

问题描述 linux系统tomcat重启报错 以下是启动是的错误信息: INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 21, 2015 4:26:24 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 21, 2015 4:26:24 PM org.apache.jk.server.JkMain start INFO: