`
pavel
  • 浏览: 928226 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

startup failed due to previous errors

阅读更多

在使用SSH添加

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

 

tomcat在启动的时候发生如下错误: 

2008-9-28 11:13:01 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2008-9-28 11:13:01 org.apache.catalina.core.StandardContext start
严重: Context [/xxfire] startup failed due to previous errors

 

 

错误分析:

 

      错误触发在web.xml中定义

Xml代码 复制代码
  1. <context-param>  
  2.         <param-name>contextConfigLocation</param-name>  
  3.         <param-value>/WEB-INF/context/ApplicationContext-*.xml</param-value>  
  4. </context-param>  
  5. <SPAN style="COLOR: #000000"><listener>  
  6.         <listener-class><SPAN style="BACKGROUND-COLOR: #ff6600">org.springframework.web.context.ContextLoaderListener</SPAN></listener-class>  
  7. </listener></SPAN>  
<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/context/ApplicationContext-*.xml</param-value>
</context-param>
<listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

   检查spring配置管理xml文件。发现错误产生在:

 

Xml代码 复制代码
  1. <bean id="dataSource" class="<SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ff6600">org.apache.commons.dbcp.BasicDataSource</SPAN>">  
  2.     <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>  
  3.     <property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"></property>  
  4.     <property name="username" value="sys8"></property>  
  5.     <property name="password" value="sys8"></property>  
  6. </bean>  
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
	<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>
	<property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"></property>
	<property name="username" value="sys8"></property>
	<property name="password" value="sys8"></property>
</bean>

   上面所示的代码中,红色代码是产生错误的根源,在spring管理Hibernate的dataSource是用的是:

Java代码 复制代码
  1. <SPAN style="COLOR: #000000">org.springframework.jdbc.datasource.DriverManagerDataSource</SPAN>  
org.springframework.jdbc.datasource.DriverManagerDataSource

 

解决:

Xml代码 复制代码
  1. <bean id="dataSource" class="<SPAN style="BACKGROUND-COLOR: #ff6600">org.springframework.jdbc.datasource.DriverManagerDataSource</SPAN>">  
  2.     <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>  
  3.     <property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"></property>  
  4.     <property name="username" value="sys8"></property>  
  5.     <property name="password" value="sys8"></property>  
  6. </bean>  
分享到:
评论

相关推荐

    Tomcat xalan包冲突导Error filterStart Context startup failed due to previous errors

    NULL 博文链接:https://123390255-qq-com.iteye.com/blog/1100047

    Tomcat 不显示详细日志的问题

    但是,在某些情况下,Tomcat 的详细错误日志可能会消失,只报一个万恶的 Context [] startup failed due to previous errors,却找不到 previous errors 具体是啥东西。这篇文章将为您介绍解决该问题的方法。 问题...

    struts2开发遇到的问题

    7. **严重:Exception starting filter struts2,Error filterStart,Context [/struts2] startup failed due to previous errors** 这个严重错误通常涉及到Struts2配置问题,可能的原因包括: - `struts.xml`中的...

    tomcat排错经典案例之404.docx

    严重: Context startup failed due to previous errors 2009-11-06 21:39:17 org.apache.catalina.core.StandardHostDeployer install 信息: Installing web application at context path /tomcat-docs from URL ...

    struts2驱动包

    严重: Context [/OAProject] startup failed due to previous errors 2009-8-29 14:02:25 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext log4j:WARN No ...

    BURNINTEST--硬件检测工具

    - Enhanced the mechanism to report memory hardware errors in the Memory torture test. Release 5.3 build 1033 WIN32 release 1 October 2008 - Changes to correct a BurnInTest crash problem on some ...

    微软内部资料-SQL性能优化3

    It is up to the application to define what consistency means, and isolation in some form is needed to achieve consistent results. SQL Server uses locking to achieve isolation. Definition of ...

    php.ini-development

    display_startup_errors ; Default Value: Off ; Development Value: On ; Production Value: Off ; error_reporting ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ; Development Value: E_...

    EurekaLog_7.5.0.0_Enterprise

    9)....Added: EMemLeaks._ReserveOutOfMemory to control reserve size of out of memory errors (default is 50 Mb) 10)..Added: "MinLeaksLimitObjs" option (EMemLeaks unit) 11)..Added: Fatal memory problem ...

    Bochs - The cross platform IA-32 (x86) emulator

    [3084390] Bochs won't load floppy plugin right on startup [3043174] Docbook use of '_' build failure [3085140] Ia_arpl_Ew_Rw definition of error [3078995] ROL/ROR/SHL/SHR modeling wrong when dest ...

Global site tag (gtag.js) - Google Analytics