[에러해결]
와.. 이거 해결하는데 정말 5시간은 족히 걸린거 같습니다 ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ(인간승리... 굉장히 짜증났어요....후)
기존에 쓰던 파일을 import하는데 생기는 이클립스 톰캣에러입니다.
에러 맨위에서 보시면, 아래 빨간부분같이 org.eclipse.wst.server.core\tmp1\wtpwebapps\프로젝트명\WEB-INF\classes\egovframework\spring\com\context-aspect.xml]; nested exception is java.lang.ClassNotFoundException: 이러한 에러가 나오면 해결할 수 있는 방안입니다.
2018-08-27 12:18:34,484 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Ignoring bean class loading failure for bean 'egovHandler'Ignoring bean class loading failure for bean 'egovHandler' org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [egovframework.com.cmm.EgovComExcepHndlr] for bean with name 'egovHandler' defined in file [이클립스 경로\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\프로젝트명\WEB-INF\classes\egovframework\spring\com\context-aspect.xml]; nested exception is java.lang.ClassNotFoundException: egovframework.com.cmm.EgovComExcepHndlr
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [egovframework.com.cmm.EgovComExcepHndlr] for bean with name 'egovHandler' defined in file [이클립스경로\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\프로젝트명\WEB-INF\classes\egovframework\spring\com\context-aspect.xml]; nested exception is java.lang.ClassNotFoundException: egovframework.com.cmm.EgovComExcepHndlr
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1325) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:385) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:354) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:82) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:611) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4852) [catalina.jar:8.0.49]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5313) [catalina.jar:8.0.49]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.49]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [catalina.jar:8.0.49]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [catalina.jar:8.0.49]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_181]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_181]
Caused by: java.lang.ClassNotFoundException: egovframework.com.cmm.EgovComExcepHndlr
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335) ~[catalina.jar:8.0.49]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163) ~[catalina.jar:8.0.49]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:246) ~[spring-core-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1346) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1317) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 19 more
2018-08-27 12:18:34,496 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Ignoring bean class loading failure for bean 'otherHandler'
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [egovframework.com.cmm.EgovComOthersExcepHndlr] for bean with name 'otherHandler' defined in file [C:\dgdnjob\eGovFrameDev-3.5.1-64bit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\dgdnjob_ori\WEB-INF\classes\egovframework\spring\com\context-aspect.xml]; nested exception is java.lang.ClassNotFoundException: egovframework.com.cmm.EgovComOthersExcepHndlr
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1325) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:385) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:354) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:82) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:611) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4852) [catalina.jar:8.0.49]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5313) [catalina.jar:8.0.49]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.49]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [catalina.jar:8.0.49]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [catalina.jar:8.0.49]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_181]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_181]
Caused by: java.lang.ClassNotFoundException: egovframework.com.cmm.EgovComOthersExcepHndlr
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335) ~[catalina.jar:8.0.49]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163) ~[catalina.jar:8.0.49]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:246) ~[spring-core-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1346) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1317) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 19 more
인터넷 이것저것 찾아보니까 첫번째로 간단한 해결은
pom.xml를 Ctrl + X 해서 저장 후 다시 Ctrl + V해서 프로젝트 클린(project->clean) 하시면 해결된다고 합니다.
(참고로 저는 안되었습니다.)
제가 해결한 방법은 아래와 같습니다.
1. 해당 프로젝트 오른쪽클릭 후 properties 클릭 (아래 그램과 같이)
2. 왼쪽에 1번에 JavaBuild Path를 클릭 후 2번 Order and Export로 이동 후 3번박스에서 혹시 jar이나 라이브러리중에서 경로잘못되었거나 X표시된 부분이있으면 찾아서 경로 맞게 다시 불러와주세요 (저는 ojdbc가 예전 프로젝트 경로로 되어있어서 x표시되어있는걸 다시불러와서 넣었습니다.)
3. 위 저장 후 이클립스경로\workspace\.metadata\.plugins\org.eclipse.core.resources에 들어가면 아래 빨간박스와 같이 숫자.snap이 있습니다. 이 폴더를 삭제해 주세요.
4. 프로젝트 클린( project -> clean) 후 기존에 있던 톰켓서버를 삭제(꼭 다시 삭제 해 주셔야 합니다.) 후 다시 생성하여 실행해주면 에러 해결...
추가 : 만약에 위와 같이 안된다면 2번에서 3번박스에 모두 체크하고 다시 snap파일을 지우고 프로젝트 클린 후 톰켓서버 다시 삭제하고 생성해주세요.. 그러면 해결될겁니다...
진짜 화나는 에러였습니다...
화이팅..
'IT오류잡기 > 전자정부프레임' 카테고리의 다른 글
Could not resolve dependencies for project -maven build 시 에러 (0) | 2019.10.09 |
---|---|
Ambiguous mapping found. Cannot map 'xxxController' bean method 현상 해결 (0) | 2018.08.24 |