今天在做开发项目的时候出现一直在控台输出创建sqlsessionfactory'这个代码,

tomcat一直在控制台上输出这个内容无法停止下来,那么到底是什么原因呢,

我们可以在输出信息上看到有个warn信息,也可以看error信息

-- ::, [WARN]-[org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean(AbstractBeanFactory.java:)]
[ localhost-startStop-: ] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'boTilySendMapper' defined in file
[E:\adf-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\ydbi\WEB-INF\classes\com\cxy\dao\BoTilySendMapper.class]:
Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/app/spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException:
Failed to parse mapping resource: 'file [E:\adf-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\ydbi\WEB-INF\classes\mybatis\com\cxy\matrix\dao\iteMapper.xml]';
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException:
Mapped Statements collection already contains value for com.cxy.dao.Matrix_cross_sortToSiteMapper.ooterData

最后可以清晰看到是那个mapper文件中出现了数据重复问题,所以可以得出问题在

mapper文件中有两个方法是重复的.

解决办法:首先查看warn部分内容,找出具体原因所在

改变方法名称

[DEBUG]-[org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:431)] 一直在创建sqlsession工厂原因的更多相关文章

  1. Mybatis【2.1】-- 从读取流到创建SqlSession发生了什么?

    目录 1.Resources.getResourceAsStream("mybatis.xml")到底做了什么? 2. new SqlSessionFactoryBuilder() ...

  2. java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.jav

    在整合spring和mybatis在执行数据库操作的时候报出了: java.lang.AbstractMethodError: org.mybatis.spring.transaction.Sprin ...

  3. java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout

    java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()L ...

  4. java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer;

    java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()L ...

  5. spring mvc + mybatis + spring aop声明式事务管理没有作用

    在最近的一个项目中,采用springMVC.mybatis,发现一个很恼人的问题:事务管理不起作用!!网上查阅了大量的资料,尝试了各种解决办法,亦未能解决问题! spring版本:3.0.5 myba ...

  6. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters are [1, 0, param1, param2]

    Spring+mybatis错误:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.bi ...

  7. 怪事年年有,今天特别多!org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'empno' not found. Available parameters are [emp, deptno, param1, param

    错误: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Binding ...

  8. 【异常及源码分析】org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping

    一.异常出现的场景 1)异常出现的SQL @Select("SELECT\n" + " id,discount_type ,min_charge, ${cardFee} ...

  9. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'userId' not found. Available parameters are [arg1, arg0, param1, param2]

    2018-06-27 16:43:45.552  INFO 16932 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : ...

随机推荐

  1. Apache Derby数据库系统使用方法

    Apache Derby数据库系统使用方法 最近由于项目要求,试用了一下Apache Derby数据库,这里对了解到的内容做一个记录. Apache Derby是一个开源的关系型数据库管理系统,用Ja ...

  2. MobileSubstrate

    [MobileSubstrate] Cydia Substrate (formerly called MobileSubstrate) is the de facto framework that a ...

  3. UML类图介绍及简单用法

    原文链接 一.类的属性的表示方式 在UML类图中,类使用包含类名.属性(field) 和方法(method) 且带有分割线的矩形来表示,比如下图表示一个Employee类,它包含name,age和em ...

  4. SSM框架整合(Spring+SrpingMVC+Mybatis) 简单案例

    简介: SSM框架是Spring,SpringMVC 和Mybatis框架的整合,是标准的MVC模式,将整个系统划分为表现层,controller层,service层,dao层四层. Spring实现 ...

  5. 【HDU3394】Railway

    [题目描述] 有一个公园有n个景点,公园的管理员准备修建m条道路,并且安排一些形成回路的参观路线.如果一条道路被多条道路公用,那么这条路是冲突的:如果一条道路没在任何一个回路内,那么这条路是不冲突的 ...

  6. c++ 多态问题(在虚函数里调用虚函数)

    最近在看cocos2d-x的源码,非常感激cocos2d作者的开源精神.在看代码的过程中感觉两个方向让我受益,1.把之前从书中看到的c++知识,明白了怎么运用.2.学习作者驾驭代码的巧妙方法. 看co ...

  7. Log4php使用指南

      一.Log4php简介 Log4php是Log4xx系列日志组件之一,是Log4j迁移到php的版本,主要用来记录日志信息,支持多种输入目的地,包括:日志文件.日志回滚文件.数据库.日志服务器等等 ...

  8. 501. Find Mode in Binary Search Tree查找BST中的众数

    [抄题]: Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently oc ...

  9. Rails 和 Django 的深度技术对比

    我想以一个免责声明来开始下面的内容.我使用 Django开发网站已经有三年了,众所周知,我喜欢Django.我已经写了一个开源的应用程序( app),并且我已经将补丁发送到了Django.然而,我以尽 ...

  10. GNU 和 g++(转)

    百度知道 GNU计划,又称革奴计划,是由Richard Stallman在1983年9月27日公开发起的.它的目标是创建一套完全自由的操作系统.Richard Stallman最早是在net.unix ...