title: SQLITE_BUSY The database file is locked (database is locked) in wicket
body: <p>I am doing a project in wicket
  How to solve the problem.
  I came across such a message:
  WicketMessage: Can't instantiate page using constructor public itucs.blg361.g03.HomePage()</p>
  
  <p>Root cause:</p>
  
  <p>java.lang.UnsupportedOperationException: [SQLITE_BUSY] The database file is locked (database is locked)
  at itucs.blg361.g03.CategoryEvents.CategoryEventCollection.getCategoryEvents(CategoryEventCollection.java:41)</p>
  
  <pre><code> public List&lt;CategoryEvent&gt; getCategoryEvents() {
      List&lt;CategoryEvent&gt; categoryEvents = new 
              LinkedList&lt;CategoryEvent&gt;();
      try {
          String query = "SELECT id, name, group_id"
                  + " FROM event_category";
          Statement statement =  this.db.createStatement();
          ResultSet result = statement.executeQuery(query);
          while (result.next()) {
              int id = result.getInt("id");
              String name = result.getString("name");
              int group_id = result.getInt("group_id");
              categoryEvents.add(new CategoryEvent(id, name, group_id));
          }
      } catch (SQLException ex) {
          throw new UnsupportedOperationException(ex.getMessage());
      }
          return categoryEvents;  
  }
  </code></pre>
  
  <p>at itucs.blg361.g03.HomePage.(HomePage.java:71)</p>
  
  <pre><code>        categories = categoryCollection.getCategoryEvents();
  </code></pre>
  
  <p>at java.lang.reflect.Constructor.newInstance(Constructor.java:525)</p>