Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Weblogic, Struts and Log4j. Log4J errors

Posted on 2002-06-06
6
Medium Priority
?
652 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Accepted Solution

by:
mraible earned 600 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

782 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