Solved

log4j in websphere on Solaris

Posted on 2003-10-22
9
653 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 84
jar file executable 12 52
eclipse with Angularjs2.0 3 36
Which non-HTML GUI front end to use with Java? 3 22
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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 tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

773 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