title: Getting [SQLITE_BUSY] database file is locked with select statements
body: <p>If I run multiple threads against my web app I get:</p>
  
  <pre><code>java.sql.SQLException: [SQLITE_BUSY]  The database file is locked (database is locked)
      at org.sqlite.DB.newSQLException(DB.java:383)
      at org.sqlite.DB.newSQLException(DB.java:387)
      at org.sqlite.DB.execute(DB.java:339)
      at org.sqlite.PrepStmt.executeQuery(PrepStmt.java:75)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
  </code></pre>
  
  <p>I do know that only one thread can write to a sqlite database but I'm only reading from the database. So why do I get this error message ?</p>
  
  <p>BTW: My connection pool looks like this:</p>
  
  <pre><code>&lt;bean class="org.apache.commons.dbcp.BasicDataSource"
          destroy-method="close" id="dataSource"&gt;
      &lt;property name="driverClassName" value="${database.driverClassName}" /&gt;
      &lt;property name="url" value="${database.url}" /&gt;
      &lt;property name="username" value="${database.username}" /&gt;
      &lt;property name="password" value="${database.password}" /&gt;
      &lt;property name="initialSize" value="1" /&gt;
      &lt;property name="maxActive" value="2" /&gt;
      &lt;property name="maxIdle" value="1" /&gt;
      &lt;property name="poolPreparedStatements" value="true" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The setup is: Java 1.6, Tomcat 7.0.34, Spring 3.2, Hibernate 3.6.9 and sqlite3 3.7.2 </p>
  
  <p>Regards
    Roger</p>