log4j does not exist
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ninad_Pagedar
Posted On:   Thursday, March 6, 2008 06:16 AM

I am using IBM Websphere...
While running a project on it I am getting error:
package org.apache.log4j does not exist

It will be good if you tell me how to find this class and what else need to be done....

I am new to Java so anything that you provide will be helpful

Re: log4j does not exist

Posted By:   Stephen_McConnell  
Posted On:   Friday, March 7, 2008 04:12 PM

I had to chuckle at your topic title... I was about to answer "why yes, of course it does...," ;)


But you are having a problem common to deploying web applications.


Not having worked with Websphere (but I will be soon), I can't tell you an answer specific to Websphere. But most Web Application Servers have two basic ways of deploying jar files or packages to Web Applications.


First, you need to download the log4j libraries. You can find them on Apache Log4j site. The classes you need are found all bundled up in a jar file.


Once you find that jar file, you need to put it in one of two places.


The first location is in a common folder on the Web Server. Most Web Application Servers have a folder where all jar files common to all Web Applications go. The WebSphere documentation should tell you what folder that is. Log4J is a good jar file to put there, because most of you applications will be using it. And you want them all to be using the same version.


The second location to put jar files is in your Web Applications library folder (WEB-INF/lib) folder with the Web applications. Usually you might want to put things like your JDBC jars or Application Specific jars there. Depending upon your IDE it may or may not be automatically deployed to your web app on the web server.


I tend to like to put my jars in the second option. This is because it becomes a single deployable package and isn't necessiarily dependent on what type of Web Server I'm using.


Hope this gives you a direction to look.


Stephen Mcconnell

About | Sitemap | Contact