title: The property file is not found when it's in a jar
body: <p>I've got a problem with my property file since I deploy my application within jars. When it was just in the WEB-INF/classes directory, there was no problem. My problems occur only with properties files inside jars.</p>
  
  <p>Let me explain. I will simplify my code.</p>
  
  <p>My application deals with buisiness objects called IPX (it's not useful to know what it is)</p>
  
  <p>There's a DAO class called IpxDaoImpl with string attributes, that are SQL queries</p>
  
  <pre><code>public class IpxDaoImpl implements IpxDao extends SimpleJdbcDaoSupport {
    private String listAllIpxSql; // query for listing IPX in Database
  
    public void listAllIpx() {
      // Does a query in Database using the variable listAllIpxSql
      // ...
    }
  
    public void setListAllIpxSql(String listAllIpxSql) {
      this.listAllIpxSql = listAllIpxSql;
    }
  }
  </code></pre>
  
  <p>This class is defined in a config xml file, called appContext-dao.xml. It contains :</p>
  
  <pre><code>&lt;bean id="ipxDao" class="com.IpxDaoImpl" parent="myGenericDao"&gt;
  
    &lt;property name="listAllIpxSql" value="${ipx.list}" /&gt;
  
  &lt;/bean&gt;
  </code></pre>
  
  <p>There is another config xml file, that tells how to load the properties files : appContext-commo-dao.xml. It contains :</p>
  
  <pre><code>&lt;context:property-placeholder location="classpath*:**/sql.properties" /&gt;
  </code></pre>
  
  <p>And there is a sql.properties file proper to queries about IPX. It contains :</p>
  
  <pre><code>ipx.list=SELECT * FROM IPX
  </code></pre>
  
  <p>Now, when I deploy my application in WEB-INF/classes, everything is fine. But we have an integration environement where we have to generate jars. All the files I've mentioned above are in the same jar. And then, when I deploy, I've got this error :
  Could not resolve placeholder 'ipx.list'
  It seems that the property file sql.properties is not found.</p>
  
  <p>I've tried to extract this property file and put it in the WEB-INF/classes directory, with the proper folder. And now it works.</p>
  
  <p>So, what is wrong with my code? Is it the placeholer ?
  Thanks in advance.</p>
  
  <p>Cedric</p>