JAVA WEB Application에서 logback을 사용하고 있을때,
Tomcat으로 deploy 했을때는 정상작동 했지만
weblogic 에서는 null 에러가 발생하면서,
####<2017. 9. 12 오후 6시 08분 26초 KST> <Info> <ServletContext-> <RLPSWAS> <Server-0-AAAAAA> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1505207306408> <BEA-000000> <Shutting down Logback>
####<2017. 9. 12 오후 6시 08분 26초 KST> <Warning> <HTTP> <RLPSWAS> <Server-0-AAAAAA> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1505207306414> <BEA-101162> <User defined listener ch.qos.logback.ext.spring.web.LogbackConfigListener failed: java.lang.NullPointerException.
java.lang.NullPointerException
at ch.qos.logback.ext.spring.LogbackConfigurer.shutdownLogging(Unknown Source)
at ch.qos.logback.ext.spring.web.WebLogbackConfigurer.shutdownLogging(Unknown Source)
at ch.qos.logback.ext.spring.web.LogbackConfigListener.contextDestroyed(Unknown Source)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:679)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
인터넷의 여러 자료를 찾아서 시도하던 중.
시도1. weblogic.xml 파일 내에
<prefer-web-inf-classes>true</prefer-web-inf-classes> 추가
하지만 여전히 동일한 에러 발생한다.
시도2. weblogic.xml 파일 내에
<show-archived-real-path-enabled>true</show-archived-real-path-enabled> 추가
성공
최종 weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
<context-root>/</context-root>
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled><!-- logback 사용하기 위해 -->
<prefer-web-inf-classes>true</prefer-web-inf-classes><!-- logback 사용하기 위해 -->
</container-descriptor>
</weblogic-web-app>
'Java > tomcat' 카테고리의 다른 글
weblogic 12c 실행 (0) | 2017.09.12 |
---|