File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes log4j configuration in Sping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "log4j configuration in Sping" Watch "log4j configuration in Sping" New topic

log4j configuration in Sping

Shantanu Puranik
Ranch Hand

Joined: Jun 10, 2004
Posts: 67
I�ve Tomcat 6 running with jdk1.6 using Spring 2.5 & Eclipse 3.4 IDE

applicationContext.xml contains

The problem is when applicationContext.xml is loaded, following error is generarted

It tries to search file inside <tomcathome>/config/log4j.xml
Whereas what needed is locating file at <context root>/config/log4j.xml

Definitely, it�s one some setting which needs to be altered.
But how & where is my question.

--- Shantanu
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

You can always prefix resource with either "classpath:" or "file:" or "http:"

Classpath looks for the file in the classpath.
File looks in the OS FileSystem
Http looks in your web environment.

Sometimes too, you need to just put a "/" in front of your path. But I doubt that that would work for you.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: log4j configuration in Sping
Similar Threads
Problem regarding Struts+Spring+hibernate
using TransactionProxyFactoryBean
Unit tetsing (Junit) Spring Framework
Spring2.5.6+Tomcat7: HTTP Status 404: The requested resource () is not available
Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/transactio