Link to home
Start Free TrialLog in
Avatar of nikloc
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

Avatar of girionis
girionis
Flag of Greece image

 They are just configuraiton warnings. I'd say you could safely ignore them.
Avatar of nikloc
nikloc

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-name>
    <servlet-class><path to your log4j servlet></servlet-class>
    <init-param>
      <param-name>init-file</param-name>
      <param-value>initlog.txt</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
> yes, but no logs are being written (should have mentioned this in the orginal question)

  Ah, ok then. Try my above comment.
Avatar of nikloc

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?

ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nikloc

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
 Nice. Glad you solved it :-) Thank you for the points.