Note that there are some explanatory texts on larger screens.

plurals
  1. POin java webapp,hsqldb url won't accept relative path. is it due to maven configuration?
    text
    copied!<p>i'm developing a webapp made up with 2 other maven modules. </p> <p>i have the model module which representes database layer.it has spring application context <code>test-model-config.xml</code> in <code>test/resources/META-INF</code> for testing and the properties files in <code>test/resources' default package</code>. and <code>model-config.xml</code> in <code>resources/META-INF</code> which is the live context and which is supposed to pick properties from the webapp. up to now builds fine, works fine no problem</p> <pre><code>- &lt;!-- test-model-config.xml and model-config.xml have the same thing--&gt; &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt; &lt;property name="driverClassName" value="${jdbc.driverClassName}" /&gt; &lt;property name="url" value="${jdbc.url}" /&gt; &lt;property name="username" value="${jdbc.username}" /&gt; &lt;property name="password" value="${jdbc.password}" /&gt; &lt;/bean&gt; </code></pre> <p>here is just a snippet of the properties in test/resources</p> <pre><code>jdbc.driverClassName=org.hsqldb.jdbcDriver jdbc.username=sa jdbc.password= jdbc.url=jdbc:hsqldb:file:target/mydb;create=true </code></pre> <p>there is another module services which has the same kind of conf where there is a test config and a live config files.this one too separately has no problem.builds fine , works fine.</p> <p>now the webapp there is <code>webapp-config.xml</code> in <code>/web pages/WEB-INF</code> and <code>general.properties</code> for all the properties needed for model and service modules. so <code>general.properties</code> and <code>webapp-log4j.properties</code> are in <code>resources' default package</code> of the webapp.here a snippet of <code>webapp-config.xml</code></p> <pre><code> &lt;import resource="classpath:META-INF/model-config.xml" /&gt; &lt;import resource="classpath:META-INF/service-config.xml" /&gt; &lt;bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; &lt;property name="locations"&gt; &lt;list&gt; &lt;value&gt;classpath:general.properties&lt;/value&gt; &lt;value&gt;classpath:webapp-log4j.properties&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>in the general.properties we have</p> <pre><code>jdbc.driverClassName=org.hsqldb.jdbcDriver jdbc.username=sa jdbc.password= jdbc.url=jdbc:hsqldb:file:classpath:target/mynewdb;create=true // .... </code></pre> <p>it also builds fine and runs fine with an issue.</p> <p><strong>1</strong> : the log says:</p> <blockquote> <p>java.sql.SQLException: File input/output error classpath:target/mynewdb.properties java.io.FileNotFoundException: classpath:target/mynewdb.properties.new (No such file or directory) full debug output is <a href="http://pastie.org/1898735" rel="nofollow">here</a></p> </blockquote> <p>i'm really surprised because this is the first time i'm facing this kind of error.it's running fine with a absolute url as <code>/media/Repo/myproject/mydb;create=true</code>, but the idea is to have it in the the webapp target so that it got deleted when target folder is being deleted.</p> <p>well i have no clue and it's been 2 days now. How can id fix this? is here something i'm not seei/doing? is it due to maven configuration? my pom is viewable <a href="http://pastie.org/1915284" rel="nofollow">here</a> thanks for reading this.</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