Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Weblogic, Struts and Log4j. Log4J errors

Posted on 2002-06-06
6
Medium Priority
?
649 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
[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
  • 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
Technology Partners: 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 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

705 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