Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>classpath:/<strong>resources</strong>/META-INF/spring/log4j.xml</p> </blockquote> <p>Looks like you are using maven. But maven will "mash" the <code>src</code> and <code>resources</code> folder to one. So in case of an Maven project, the path would be: <code>classpath:META-INF/spring/log4j.xml</code></p> <p><em>without slash after <code>classpath:</code></em></p> <hr> <p>If you work on a server you should initialize the logging framework before Spring starts, because Spring itself will use it to log information while starting.</p> <p>One way to do so, is to add this lines in the web.xml (than you do not need to do this in the spring configuration)</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;log4jConfigLocation&lt;/param-name&gt; &lt;param-value&gt;/WEB-INF/classes/META-INF/log4j.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;listener&gt; &lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt; &lt;/listener&gt; </code></pre> <hr> <blockquote> <p>When I try to put a breakpoint and watch the value Location of function</p> </blockquote> <pre><code>public static void initLogging(java.lang.String location) throws java.io.FileNotFoundException { /* compiled code */ } </code></pre> <p>Are you really sure? The magic is done in the line: <code>URL url = ResourceUtils.getURL(resolvedLocation);</code> So <code>resolvedLocation</code> is your string "classpath:META-INF..." but the returned URL is the "translated" path.</p> <p>Pay attention to the fact, that the <code>getURL</code> function throw an exception when the ressource location starts with <code>classpath:</code> and the file is not found. So I would test what happen if I specify a not existing file. -> If no exception occurs, then there is a spelling error in <code>classpath:</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload