Logback can't find all applications running on weblogic using insertFromJNDI

回眸只為那壹抹淺笑 提交于 2019-12-12 06:17:42

问题


I'm having a real struggle finding out whats wrong. I have a weblogic 10.3.5.0 server where I have deployed three apps. One yui app and two custom java-apps. These are located on a test server. The apps are working fine when you use them, but only yui is logging (logback 1.1.2).

I have a identical app deployed locally where everything works as intended.

I use inserFromJNDI in logback.xml and it loads:

<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
    <insertFromJNDI env-entry-name="java:comp/env/applicationName" as="applicationName" />
    <contextName>{$applicationName}</contextName>
    <jmxConfigurator />
...
</configuration>

Locally it loads all three apps, but at the test server it only loads yui.

I've used WLST and checked that all apps are listed in domainRuntime().

Does anyone how to investigate this further? Or have some tips?

Please tell me if you need more info and I will provide. Thank you!


回答1:


You might have some conflicting jars between WebLogic and your application. I had a similar issue where no logs were appearing after updating WebLogic that was solved by adding the following to the weblogic.xml for each application.

<wls:container-descriptor>
        <wls:prefer-application-packages>
            <wls:package-name>org.slf4j</wls:package-name>
        </wls:prefer-application-packages>
</wls:container-descriptor>


来源:https://stackoverflow.com/questions/33280425/logback-cant-find-all-applications-running-on-weblogic-using-insertfromjndi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!