Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 백준10950번 c++
- 백준 10951번 java
- 백준 10950번 c
- 백준 10951번
- 이클립스 알고리즘 세팅
- 배열 복사
- 백준 10951번 c++
- 자바스크립트
- 티스토리 초대장
- RETURN ROW IF NO DATA FOUND
- 백준 알고리즘
- Eclipse Althrithm
- 지진
- 백준 1000번 java
- 오라클
- 펭수 달력
- 백준 10951번 c
- 2020 펭수 달력
- nodejs
- 백준 1000번 c
- 포항 지진
- 티스토리 초대장 이벤트
- 이클립스 알고리즘 환경
- 백준 1000번 c++
- JavaScript
- 백준 1000번
- 백준 10950번
- 펭수 2020 달력
- 백준 10950번 java
- oracle
Archives
- Today
- Total
스노우보드 참 좋아하는데 맨날 키보드 앞에만 있네
BeanCreationException: Error creating bean 본문
CRUD 구현하기 위해 DAO 테스트를 작성하고, JUnit 테스트를 수행하니 다음과 같은 에러가 발생하였다.
ERROR: org.springframework.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@100fc185] to prepare test instance [com.almom.test.BoardDAOTest@7bd7d6d6] java.lang.IllegalStateException: Failed to load ApplicationContext |
그리고 ..
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0': Invocation of init method failed; nested exception is java.lang.IllegalStateException: WebApplicationObjectSupport instance [ResourceHttpRequestHandler [locations=[class path resource [resources/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@3de8f619]]] does not run in a WebApplicationContext but in: org.springframework.context.support.GenericApplicationContext@3c0ecd4b: startup date [Mon Nov 27 14:52:58 KST 2017]; root of context hierarchy at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:128) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:108) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:251) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) ... 25 more Caused by: java.lang.IllegalStateException: WebApplicationObjectSupport instance [ResourceHttpRequestHandler [locations=[class path resource [resources/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@3de8f619]]] does not run in a WebApplicationContext but in: org.springframework.context.support.GenericApplicationContext@3c0ecd4b: startup date [Mon Nov 27 14:52:58 KST 2017]; root of context hierarchy at org.springframework.web.context.support.WebApplicationObjectSupport.getWebApplicationContext(WebApplicationObjectSupport.java:112) at org.springframework.web.context.support.WebApplicationObjectSupport.getServletContext(WebApplicationObjectSupport.java:128) at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.initContentNegotiationStrategy(ResourceHttpRequestHandler.java:306) at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.afterPropertiesSet(ResourceHttpRequestHandler.java:268) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ... 40 more INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/Users/USER/Documents/workspace/Project/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml] INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/Users/USER/Documents/workspace/Project/src/main/webapp/WEB-INF/spring/root-context.xml] INFO : org.springframework.context.support.GenericApplicationContext - Refreshing org.springframework.context.support.GenericApplicationContext@f1da57d: startup date [Mon Nov 27 14:52:59 KST 2017]; root of context hierarchy INFO : org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/],methods=[GET]}" onto public java.lang.String org.zerock.controller.HomeController.home(java.util.Locale,org.springframework.ui.Model) INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.context.support.GenericApplicationContext@f1da57d: startup date [Mon Nov 27 14:52:59 KST 2017]; root of context hierarchy INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.context.support.GenericApplicationContext@f1da57d: startup date [Mon Nov 27 14:52:59 KST 2017]; root of context hierarchy WARN : org.springframework.context.support.GenericApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0': Invocation of init method failed; nested exception is java.lang.IllegalStateException: WebApplicationObjectSupport instance [ResourceHttpRequestHandler [locations=[class path resource [resources/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@508dec2b]]] does not run in a WebApplicationContext but in: org.springframework.context.support.GenericApplicationContext@f1da57d: startup date [Mon Nov 27 14:52:59 KST 2017]; root of context hierarchy |
Bean 생성이 안되는 문제였다.
'개발 > Java, SpringFramework' 카테고리의 다른 글
ERROR : Context initialization failed; Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument (0) | 2017.12.06 |
---|---|
ERROR CONFIGURING APPLICATION LISTENER OF CLASS ORG.SPRINGFRAMEWORK.WEB.CONTEXT.CONTEXTLOADERLISTENER (0) | 2017.11.29 |
[Spring/STS] 프로젝트 시작 (0) | 2017.10.27 |
[spring/STS] 게시물의 파일첨부 (0) | 2017.10.27 |
URL과 URI 그리고 URN (0) | 2017.10.25 |
Comments