728x90
반응형
Weblogic
클래스 못찾는 오류
- WebLogic Server 버전: 12.2.1.4.0
Weblogic 서버 구동시 오류 발생
<Error> <HTTP> <BEA-101216>
<Servlet: "spring" failed to preload on startup in Web application: "***".
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name '***':
Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field... Caused By:
org.springframework.aop.framework.AopConfigException:
Unexpected AOP exception; nested exception is java.lang.RuntimeException:
java.lang.ClassNotFoundException:
org.springframework.dao.DataAccessException...
....
weblogic.application.ModuleException:
java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.springframework.dao.DataAccessException at
weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
서버 구동 시 어플리케이션 내 WEB-INF/lib를 먼저 보도록 설정.
- WEB-INF/weblogic.xml에 옵션 추가.
- <prefer-web-inf-classes>true</prefer-web-inf-classes>
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<context-root>/</context-root>
</weblogic-web-app>
- 서버 재구동, 오류없이 구동 됨.
- 그래도 안되는경우
특정 패키지가 실행될 경우 어플리케이션 내 WEB-INF/lib 를 먼저 보도록 설정
- WEB-INF/weblogic.xml에 옵션 추가.
- <prefer-application-packages>
<package-name>패키지명.*</package-name>
</prefer-application-packages>
<weblogic-web-app>
<container-descriptor>
<prefer-application-packages>
<package-name>패키지명.*</package-name>
</prefer-application-packages>
</container-descriptor>
<context-root>/</context-root>
</weblogic-web-app>
728x90
반응형