HSQL database user lacks privilege or object not found error
<p>I am trying to use <strong>hsqldb-2.3.4</strong> to connect from Spring applicastion.</p>

<p>I created data base using the following details</p>

<pre><code>Type : HSQL Database Engine Standalone
Driver: org.hsqldb.jdbcDriver
URL: jdbc:hsqldb:file:mydb
UserName: SA
Password: SA
</code></pre>

<p>I created a table named <strong>ALBUM</strong> under "MYDB" schema</p>

<p>In spring configuration file:</p>

<pre><code>&lt;bean id="jdbcTemplate"
    class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate"&gt;
    &lt;constructor-arg ref="dbcpDataSource" /&gt;
&lt;/bean&gt;

&lt;bean id="dbcpDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
    &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver" /&gt;
    &lt;property name="url" value="jdbc:hsqldb:file:mydb" /&gt;
    &lt;property name="username" value="SA" /&gt;
    &lt;property name="password" value="SA" /&gt;
&lt;/bean&gt;
</code></pre>

<p>And in my spring controller I am doing <code>jdbcTemplate.query("SELECT * FROM MYDB.ALBUM", new AlbumRowMapper());</code></p>

<p>And It gives me exception:</p>

<pre><code>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT * FROM MYDB.ALBUM]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: ALBUM
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
</code></pre>

<p>If I execute same query through SQL editor of hsqldb it executes fine.  Can you please help me with this.</p>