title: Log4J properties file not found
body: <p>I have a Java Project that was added to the Java Build Path of a Web Project.</p>
  
  <p>On the first Java project I added the Log4J JAR file to the Java Build Path and since this project was added to the Java Build Project of the Web Project, the JAR file was automatically added to the Web Project Java Build Path also.</p>
  
  <p>On the Web Project I have a Web Service that instantiates a class of the Java Project. That class has a simple Logger, and it works correctly.</p>
  
  <p>Now, I am trying to create a properties file named log4j.properties to configure the Logger, Appender and LayoutPattern.</p>
  
  <p>Whenever I try to call a method of the instantiaded class I get this error on the console:</p>
  
  <p><strong>log4j:ERROR Could not read configuration file [log4j.properties].</strong></p>
  
  <p>What am I doing wrong?</p>
  
  <p>Here's the log4j properties file:</p>
  
  <pre><code>log4j.rootLogger=DEBUG, CA
  
  log4j.appender.CA=org.apache.log4j.ConsoleAppender 
  log4j.appender.CA.layout=org.apache.log4j.PatternLayout 
  log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
  </code></pre>
  
  <hr>
  
  <p>Sorry but it was a false alarm...</p>
  
  <p>Like I said, the project where the class that instantiates the logger resides is added as a dependency o a main project where the web services are defined.</p>
  
  <p>As a result that project is published on a JAR file and with the suposed solution I mentioned:</p>
  
  <p>PropertyConfigurator.configure(getClass().getProtectionDomain().getCodeSource().getLocation().getPath() + "log4j.properties");</p>
  
  <p>I get a path like:</p>
  
  <p>C:/project_path.jar/log4j.properties.</p>
  
  <p>Obviously the propertied files still isn't found...</p>
  
  <p>Sory... Still working on a solution</p>