问题
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