Solved

log4j in websphere on Solaris

Posted on 2003-10-22
9
644 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
  • 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 250 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now