Solved

Weblogic, Struts and Log4j. Log4J errors

Posted on 2002-06-06
6
643 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
difference of if loops 23 62
Configure a Bean in an XML file 4 42
ejb message driven bean mdb creation steps 2 23
java example issue 3 23
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)
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

828 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