nikloc
asked on
log4j in websphere on Solaris
hi all,
I have developed a web app using WebSphere 5, Oracle 9i, Apache2 and log4j all on a win2k environment. Everything work as expected.
Now I try to deploy the web app using the same software as listed above but on a Solaris 2.8 O/S and everything works apart from log4j. I have made the environmental changes to log4j.properties required to run on Solaris but in the websphere SystemErr.log I get the following output:
SystemErr R log4j:WARN No appenders could be found for logger
SystemErr R log4j:WARN Please initialize the log4j system properly
Can anyone explain wht this would happen?
Many thanks
Nikloc
I have developed a web app using WebSphere 5, Oracle 9i, Apache2 and log4j all on a win2k environment. Everything work as expected.
Now I try to deploy the web app using the same software as listed above but on a Solaris 2.8 O/S and everything works apart from log4j. I have made the environmental changes to log4j.properties required to run on Solaris but in the websphere SystemErr.log I get the following output:
SystemErr R log4j:WARN No appenders could be found for logger
SystemErr R log4j:WARN Please initialize the log4j system properly
Can anyone explain wht this would happen?
Many thanks
Nikloc
They are just configuraiton warnings. I'd say you could safely ignore them.
ASKER
yes, but no logs are being written (should have mentioned this in the orginal question)
If you are really concerned check your web.xml file to have something similar:
<servlet>
<servlet-name>log4j-init</ servlet-na me>
<servlet-class><path to your log4j servlet></servlet-class>
<init-param>
<param-name>init-file</par am-name>
<param-value>initlog.txt</ param-valu e>
</init-param>
<load-on-startup>1</load-o n-startup>
</servlet>
<servlet>
<servlet-name>log4j-init</
<servlet-class><path to your log4j servlet></servlet-class>
<init-param>
<param-name>init-file</par
<param-value>initlog.txt</
</init-param>
<load-on-startup>1</load-o
</servlet>
> yes, but no logs are being written (should have mentioned this in the orginal question)
Ah, ok then. Try my above comment.
Ah, ok then. Try my above comment.
Look here also: http://jakarta.apache.org/log4j/docs/TROUBLESHOOT.html
ASKER
still no joy - what I don't understanding is why websphere would handle log4j differently across differing o/s but that a different issue.
From the troubleshooting guide it quotes "It is the user's responsibility to ensure that all categories can inherit an appender. This can be easily achieved by attaching an appender to the root category."
Can you explain what is meant by this?
From the troubleshooting guide it quotes "It is the user's responsibility to ensure that all categories can inherit an appender. This can be easily achieved by attaching an appender to the root category."
Can you explain what is meant by this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for the document reference - it states that the log4j.properties should be lowercase.....
You've guessed it... mine read Log4j.properties
made the change all all works well
Thanks again
You've guessed it... mine read Log4j.properties
made the change all all works well
Thanks again
Nice. Glad you solved it :-) Thank you for the points.