log4j problems in tomcat/java
I hope this is the right section. I have been trying to fix this problem for the past few days with no success and hope someone here can help me out.
When I run tomcat7, I get the following error
It doesn't find the log4jdev.xml file(which is present) because half of the path is missing (null) and I don't know why this is happening.
log4j:ERROR Could not parse file [null/WEB-INF/classes/log4jdev.xml].
java.io.FileNotFoundException: C:\eclipse-jee-juno-SR1-win32\eclipse\null\WEB-INF\classes\log4jdev.xml (The system cannot find the path specified)
The class where it gets that path is Log4JInit.java - the following code when executed returns null
and then when at the end this line sets the path
String prefix = getServletContext().getRealPath("/");
because the prefix is null, the full path becomes invalid.
I don't know why this is happening and how I should fix it in order to get the right path.