java.lang.IllegalArgumentException

Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

Samebug tips1

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.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web4462

  • Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
  • via nabble.com by Unknown author, 1 year ago
    Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
  • via Stack Overflow by wei Xiong
    , 10 months ago
    Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
  • Stack trace

    • java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required at org.springframework.util.Assert.notNull(Assert.java:115) at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:75) at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:74) at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 month ago
    Unknown user
    Once, 1 month ago
    18 times, 1 month ago
    16 times, 1 month ago
    190 more bugmates