zoukankan      html  css  js  c++  java
  • springmvc 部署时的异常

    1.Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-dao.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

    原因: 缺少aspectjweaver.jar这个包,该包是spring集成AspectJ LTW织入器所需包。

    2.Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-dao.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/ObjectPool

    原因:缺少commons-pool-1.6.jar

    3.Cannot convert value of type [java.lang.String] to required type [org.apache.ibatis.session.Configuration] for property 'configuration': no matching editors or conversion strategy found

    原因:

    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <!-- 数据库连接池 -->
        <property name="dataSource" ref="dataSource"></property>
        <!-- 加载mybatis全局配置文件 -->
        <property name="configLocation" value="classpath:mybatis/sqlMapConfig.xml">
        </property>

    <property name="configLocation" value="classpath:mybatis/sqlMapConfig.xml">

    写错成:

    <property name="configuration" value="classpath:mybatis/sqlMapConfig.xml">
  • 相关阅读:
    ios面试题(二)
    ios之自定义UINavigationBar
    ios之自定义导航栏上的返回按钮
    ios之键盘的自定义
    ios之UITabelViewCell的自定义(xib实现2)
    ios之UITabelViewCell的自定义(xib实现)
    ios之UITabelViewCell的自定义(代码实现)
    ios 登录功能学习研究
    Create Table操作
    C#数据库查询和操作大全
  • 原文地址:https://www.cnblogs.com/lgm1999/p/springmvc.html
Copyright © 2011-2022 走看看