티스토리 뷰
Spring + Mybatis
@MapperScan의 sqlSessionFactoryRef 속성지정시, Tomcat을 실행시키면 다음과 같은 WARN 메세지가 미친듯이 뜨고 start 된다.
실행이 안되는건 아니지만, 찝찝한 경고 메세지
2017-03-07 13:18:59.821 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IGameManageDao' defined in file [\admin\dao\gamemanage\IGameManageDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference? 2017-03-07 13:18:59.822 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IMissionDao' defined in file [\admin\dao\mission\IMissionDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.823 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IPreRegistDao' defined in file [\admin\dao\preregist\IPreRegistDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.825 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IStatDao' defined in file [\admin\dao\stat\IStatDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.831 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IGameManageDao' defined in file [\admin\dao\gamemanage\IGameManageDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.831 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IMissionDao' defined in file [\admin\dao\mission\IMissionDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.832 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IPreRegistDao' defined in file [\admin\dao\preregist\IPreRegistDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.833 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IStatDao' defined in file [\admin\dao\stat\IStatDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.837 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IGameManageDao' defined in file [\admin\dao\gamemanage\IGameManageDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.837 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IMissionDao' defined in file [\admin\dao\mission\IMissionDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.838 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IPreRegistDao' defined in file [\admin\dao\preregist\IPreRegistDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-03-07 13:18:59.839 WARN 25580 [main] --- org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean:1480 : Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IStatDao' defined in file [\admin\dao\stat\IStatDao.class]: Cannot resolve reference to bean 'adminSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'pubdbSqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
내가 적용한 버전
compile("org.mybatis:mybatis:3.2.7")
compile("org.mybatis:mybatis-spring:1.2.2")
spring 4.2.4
SqlSessionFactory Bean 생성 부분
@Configuration @MapperScan(basePackages = {MybatisConfig.BASE_PACKAGE }, annotationClass = Admin.class, sqlSessionFactoryRef = "adminSqlSessionFactory") class MybatisPubdbConfig extends MybatisConfig { @Bean(name = "adminSqlSessionFactory") public SqlSessionFactory adminSqlSessionFactory(@Qualifier("pubdbDataSource") DataSource dataSource) throws Exception { SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean(); configureSqlSessionFactory(sessionFactoryBean, dataSource); return sessionFactoryBean.getObject(); } @Bean(name = "adminqlSessionTemplate") public SqlSessionTemplate adminSqlSessionTemplate(SqlSessionFactory adminSqlSessionFactory) throws Exception { return new SqlSessionTemplate(adminSqlSessionFactory); } }
찾아보니 mybatis와 spring의 버전 문제가 될수 있다고 한다.
Mybatis 버전을 변경하고 다시 빌드를 해보니, 더이상 WARN 메세지가 없어졌다.
해결!
compile("org.mybatis:mybatis:3.3.0")
compile("org.mybatis:mybatis-spring:1.2.4")
'프로그램 > JAVA' 카테고리의 다른 글
java.lang.UnsatisfiedLinkError: no net in java.library.path (0) | 2017.08.17 |
---|---|
Spring cors 세팅 (0) | 2017.03.31 |
객체지향언어 자바 (0) | 2017.02.01 |
Mybatis not support overload (1) | 2017.01.13 |
스프링프레임웍 호스트설정시 주의사항 (0) | 2017.01.11 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- nested exception is org.apache.ibatis.binding.BindingException\
- 객체지향언어 자바
- jenkins remote api
- 스프링 마이바티즈 연동오류
- oauth sso 차이
- 원격접속툴
- mybatis overload
- mybatis overloading
- spring mybatis
- 젠킨스 api
- 젠킨스 윈도우 설치
- common-dbcp
- 원격접속 무료툴
- 스프링 크로스도메인
- jenkins asyncpeople
- jenkins user list
- select count(*) performence
- google vm ssh
- mysql count
- 작은거에소스라치게놀라는나
- mysql 인덱스
- java.lang.UnsatisfiedLinkError
- a태그 onclick이벤트
- response server header
- springboot server header
- BeanCreationException
- 인덱스 자료구조
- no net in java.library.path
- Google ssh console
- mysql count 성능
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
글 보관함