?
Solved

log4j in websphere on Solaris

Posted on 2003-10-22
9
Medium Priority
?
669 Views
Last Modified: 2013-12-05
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

0
Comment
Question by:nikloc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 9598289
 They are just configuraiton warnings. I'd say you could safely ignore them.
0
 

Author Comment

by:nikloc
ID: 9598299
yes, but no logs are being written (should have mentioned this in the orginal question)
0
 
LVL 35

Expert Comment

by:girionis
ID: 9598317
 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>
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 35

Expert Comment

by:girionis
ID: 9598321
> yes, but no logs are being written (should have mentioned this in the orginal question)

  Ah, ok then. Try my above comment.
0
 
LVL 35

Expert Comment

by:girionis
ID: 9598361
0
 

Author Comment

by:nikloc
ID: 9598634
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?

0
 
LVL 35

Accepted Solution

by:
girionis earned 750 total points
ID: 9598852
 Well I am not sure what it means *exactly*, I wouldn't want to give you wrong information but in a few words an appender is just an alias for the location where the messages will be logged, an output destination in other words. A category is a handle for logging. So you need to attach the an appender to the root category.

 I found another article that explains a few things: http://www.sys-con.com/websphere/article.cfm?id=371 it might help.
0
 

Author Comment

by:nikloc
ID: 9599537
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
0
 
LVL 35

Expert Comment

by:girionis
ID: 9601469
 Nice. Glad you solved it :-) Thank you for the points.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
A solution for Fortify Path Manipulation.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question