멀티 DB 설정하기-No bean named 'OtherSqlMapClient' is defined
- 작성자 :
- 정*배
- 작성일 :
- 2014-03-07 13:49:32
- 조회수 :
- 1,038
- 구분 :
- 개발환경
- 진행상태 :
- 완료
Q
멀티DB설정방법으로 설정 [첨부파일 참고] 하고 실행하니 다음과 같은 에러가 발생하였습니다.
어느 부분을 봐야 하나요?
[2014-03-07 13:12:43] ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TestOtherDAO ': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'OtherSqlMapClient' is defined
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
-- 중략
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'OtherSqlMapClient' is defined
어느 부분을 봐야 하나요?
[2014-03-07 13:12:43] ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TestOtherDAO ': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'OtherSqlMapClient' is defined
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
-- 중략
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'OtherSqlMapClient' is defined
A
안녕하세요 프레임워크센터입니다.
datasource설정 중 alias를 주는 이름이 중복되어 있습니다.
<alias name="dataSource" alias="OtherDataSource" />
이 부분을 삭제 후 다시 시도해보기 바랍니다.
수고하세요.
datasource설정 중 alias를 주는 이름이 중복되어 있습니다.
<alias name="dataSource" alias="OtherDataSource" />
이 부분을 삭제 후 다시 시도해보기 바랍니다.
수고하세요.