Solved

log4j in websphere on Solaris

Posted on 2003-10-22
9
657 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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.

749 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