ssh框架整合时的一点异常总结

来源:互联网 发布:软件的版权声明 编辑:程序博客网 时间:2024/05/17 06:41
异常1:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
原因:web.xml中没有
  <!-- 监听器 -->
  <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:applicationContext.xml</param-value>
  </context-param>

异常2:
Caused by: java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
Caused by: java.lang.ClassNotFoundException: org.aopalliance.aop.Advice
原因:缺少aopalliance.jar包

异常3:
ssh 中使用c3p0 的连接池配置出错 Invalid property 'xxx' of bean class [com.mchange.v2.c3p0.ComboPoo
原因:xxx 名, com.mchange.v2.c3p0.ComboPooledDataSource不认得
解决:    driverClassName  -->driverClass  
    url -->jdbcUrl
     username -->user
    password-->pwssword
    initialPoolSize
    maxPoolSize
0 0
原创粉丝点击