Solved

Weblogic, Struts and Log4j. Log4J errors

Posted on 2002-06-06
6
642 Views
Last Modified: 2008-02-26
Hi Experts.
I have some problems deploying my application on Weblogic 6.1 sp2.
I have overwritten the struts actionServlet to initialize Log4J (1.2RC1) (propertyConfigurator) and during the startup it says:  ClassNotFound org/apache/log4j/Category

all libraries (struts.jar, classes12.jar, log4j1.2rc1.jar) are in the War file in (WEB_INF/lib/)
all property files are located next to the class file and are loaded with class.getResourceAsStream.

The whole application runs fine with JUnit test.

The Log4J initialisation is the same like the init for all JUnit tests.

Any idea?

cheers
GJ
0
Comment
Question by:jufer
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:mraible
ID: 7059526
I think's it's your version of log4j - I use jakarta-log4j-1.1.3 & struts w/o any issues (on Tomcat 4).

http://jakarta.apache.org/log4j/docs/download.html

One important change is the replacement of the Category class with Logger class and the Priority class with the Level class in order to facilitate migrating from the JDK 1.4 logging API to log4j.

P.S.  I do my initialization in a StartupServlet and don't override the ActionServlet, seems simpler...
0
 

Author Comment

by:jufer
ID: 7072704
But did you add the log4j library into the WAR file (Web-inf/lib) or did you add the library to the classpath from the weblogic server? I have no permission to change the classpath on the bea server...
0
 
LVL 1

Expert Comment

by:mraible
ID: 7073156
I'm using Tomcat 4.0.1, and I justed added it to WEB-INF/lib.  I know that this has some issues on some appservers, but weblogic is usually pretty good (compliant) on this kind of stuff.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Accepted Solution

by:
mraible earned 200 total points
ID: 7073161
Did you try (1) using 1.1.3 of Log4J, or (2) replacing your "Category" class with the "Logger" class?
0
 

Author Comment

by:jufer
ID: 7074776
To mraible:
I use Logger not Category
and I will try the 1.1.3 Log4J
0
 
LVL 35

Expert Comment

by:girionis
ID: 8834124
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- To be deleted and points NOT refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

810 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