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">
  • 相关阅读:
    从通胀说起
    科技见欲迷人眼
    吃货在西安 之 粉丝羊血泡馍
    祝母亲大人福如东海长流水,寿比南山不老松
    久违的蓝调北京
    调和生活前的问题
    《N2CMS实例教程》第四讲:Article Template Page
    《N2CMS实例教程》前言
    《N2CMS实例教程》第一讲:开发环境
    Microsoft Sync Framework 学习实例1文件同步
  • 原文地址:https://www.cnblogs.com/lgm1999/p/springmvc.html
Copyright © 2011-2022 走看看