java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

Stack Overflow | wei Xiong | 9 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    @WebMvcTest mapperscan conflict

    Stack Overflow | 9 months ago | wei Xiong
    java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
  2. 0

    mybatis-user - mybatis + spring failed to start

    nabble.com | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userMapper' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
  3. 0

    mybatis + spring failed to start

    Google Groups | 5 years ago | Hain Bach
    java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.
  6. 0

    Spring mvc+mybatis配置错误 - Java web开发及框架技术 - ITPUB论坛 - Powered by Discuz! Archiver

    itpub.net | 2 years ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deptContoller': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.sunline.sunfrm.controller.DeptContoller.setDeptService(com.sunline.sunfrm.serviceImpl.DeptService); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deptService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.sunline.sunfrm.serviceImpl.DeptService.setDeptDao(com.sunline.sunfrm.dao.DeptDao); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deptDao' defined in file : Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

  1. tvrmsmith 1 times, last 1 week ago
  2. odd 2 times, last 2 weeks ago
  3. ivanszkypeter 6 times, last 2 weeks ago
  4. tomthomas 1 times, last 2 weeks ago
  5. Axelo 1 times, last 3 weeks ago
16 more registered users
79 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

    at org.springframework.util.Assert.notNull()
  2. Spring Core
    Assert.notNull
    1. org.springframework.util.Assert.notNull(Assert.java:115)
    1 frame
  3. MyBatis-Spring
    MapperFactoryBean.checkDaoConfig
    1. org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:75)
    2. org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:74)
    2 frames
  4. Spring Tx
    DaoSupport.afterPropertiesSet
    1. org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
    1 frame
  5. Spring Beans
    AbstractAutowireCapableBeanFactory.initializeBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    2 frames