Solved

Weblogic, Struts and Log4j. Log4J errors

Posted on 2002-06-06
6
641 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 1

Accepted Solution

by:
mraible earned 200 total points
Comment Utility
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
Comment Utility
To mraible:
I use Logger not Category
and I will try the 1.1.3 Log4J
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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)
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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:

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now