tomcat 启动错误集合一

来源:互联网 发布:中国移动短信群发软件 编辑:程序博客网 时间:2024/05/23 01:21
Tomcat启动错误1:SEVERE: ContainerBase.addChild: start: 

(情况1:pom jar 引入错误:Failed to process JAR found at URL [/zbhealth] for ServletContainerInitializers for context with name [{1}])

网上还有其他情况 没试过不说

我的解决方法(亲自试过有效)

<dependency>    <groupId>javax.servlet</groupId>    <artifactId>javax.servlet-api</artifactId>    <version>3.0.1</version>    <scope>provided</scope></dependency><code></code>

Fixed:

s
<dependency>    <groupId>org.mortbay.jetty</groupId>    <artifactId>servlet-api</artifactId>    <version>3.0.20100224</version>    <scope>provided</scope></dependency>
2: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/zbhealth]]
3: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException:
 class path resource [applicationContext.xml] cannot be opened because it does not exist
文件项目路径正确,也的确存在这个文件,可能就是你的项目属性下面的Deployment Assembly没有设置好,把里面的东西重新设置一下。(我重新设置一遍就好了)
另外看见一段话:由于加载spring的默认配置文件位置一般是在/WEB-INF/下找applicationContext.xml文件。

Myeclipse文件自动生成的applicationContext文件是放在/WEB-INF/classes/applicationContext.xml

对于理解这个问题有帮助,分享给大家。

4: cvc-elt.1: Cannot find the declaration of element 'beans'

解决:有关’beans’的声明都放在http://www.springframework.org/schema/beans/spring-beans-3.0.xsd里面

由于程序有可能在没有网络的情况下运行,(我连上网这个错误就没了),这样就找不到beans了。所以对于benas的声明:可以引用本地文件来声明

将spring配置文件里面的

http://www.springframework.org/schema/aop/spring-aop-3.0.xsd  改为本地:<pre name="code" class="javascript">classpath:/org/springframework/aop/config/spring-aop-3.0.xsd  5: cvc-elt.1: Cannot find the declaration of element 'application'这个不是什么引用问题,把文件里面的东西重新保存一遍就行了。





0 0
原创粉丝点击