• 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">
  • 相关阅读:
    Scrum立会报告+燃尽图 01
    robotframework笔记6
    robotframework笔记7
    robotframework笔记5
    loadrunner函数
    robotframework笔记4
    robotframework笔记3--如何编写好的测试用例使用机器人的框架
    robotframework笔记2
    robotframework笔记1
    eclipes的Spring注解SequenceGenerator(name="sequenceGenerator")报错的解决方式
  • 原文地址:https://www.cnblogs.com/lgm1999/p/springmvc.html
Copyright © 2020-2023  润新知