“Everything should be as simple as it is, but not simpler.” Albert Einstein
Vijay Chandran wrote:
(1)How to check the class loader settings in websphere application server 6.1?
Vijay Chandran wrote:
(2) I have put all the log4j.jar in the respectiver EAR application's WEB-INF/lib folder. So each EAR file has its own log4j.jar file.
There is a log4j.jar in the C:\Program Files\IBM\WebSphere\AppServer\lib folder. The version of log4j.jar is 1.2.8
“Everything should be as simple as it is, but not simpler.” Albert Einstein
Yogesh Gandhi wrote:I do not know if my suggestion here would exactly match with the question being asked, but my problem looks similar.
My problem was that logs were not being written to log file specified in log4j.properties. I was using websphere which had several applications deployed.
Class loading policy in websphere console was Multiple and parent last, as mentioned above. (i cross-checked).
I had no clue, what is going wrong and why logs are not getting generated.
At last, I made a struts-web-app as given on the link : https://www.javawebtutor.com/articles/maven/maven_struts_example.php
I added log4j-1.2.8.jar to it and I added the code in the else block before going to success.jsp
and in success.jsp, I just printed the path from where log4j.properties was being picked up.
What I saw after a while was that my logs of POC project was being printed, and ALSO my other app (which was actually having problem), its logs were also getting printed in the same log file (of POC project).
From this behavior I can only say that may be the instance of the logger is singleton for a websphere instance. I am not very sure of this, but the behavior seems like that only.
May be my problem was that some other log4j settings were overwriting my instance of the actual application.
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|