title: Creating/Configuring Derby JDBC Client in IntelliJ Idea 13
body: <p>Sorry for this (maybe) stupid question. 
  I need to create some local DB in my java project so I've decided for Apache Derby Client. I am working with <strong>IntelliJ IDEA 13 Ultimate</strong> and my problem is that I don't know, how to create local database.
  Tutorials at Jetbrains websites aren't useful because there are articles only about connecting to the remote DB, not to the local one (or at least I didn't find them yet).</p>
  
  <p>What have I done so far:</p>
  
  <ol>
  <li>I've tried to set the DB up by creating new remote derby data source.
  Screenshot with the settings: <a href="http://imageshack.com/a/img42/8805/ronb.jpg" rel="nofollow" title="DB Settings">DB Settings screen</a> </li>
  </ol>
  
  <p>Username and password are the same: <code>admin</code></p>
  
  <ol>
  <li>After clicking <code>test connection</code>, this error is thrown: <a href="http://imageshack.com/a/img823/6628/i8t5.jpg" rel="nofollow">error</a></li>
  <li>When I click <code>apply</code> and <code>ok</code>, it says that it's connected, but exception is still there.</li>
  </ol>
  
  <p>So do you have any idea where the problem can be?
  I've got small confiuration class called <strong>DatabaseSetting.java</strong></p>
  
  <pre><code>package issuetrackinglite;
  
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  
  public class DatabaseSetting {
  
  private String dbURL = "jdbc:derby://localhost:1527/MallDB;create=true";
  private String user = "admin";
  private String password = "admin";
  private Connection connection;
  
  
  
  public static final String CREATE_ITEMS_DB = "CREATE TABLE items (item_id INTEGER NOT NULL, item_name VARCHAR(20) NOT NULL, item_price REAL NOT NULL, multiplicity_shop INTEGER NOT NULL, multiplicity_store INTEGER NOT NULL)";
  public static final String INSERT_PRODUCT = "INSERT INTO items (item_id, item_name, item_price, multiplicity_shop, multiplicity_store) VALUES (?, ?, ?, ?, ?)";
  public static final String CLEAR_ITEMS_DB = "DELETE FROM items";
  
  // -------------------------------------------------------------
  
  protected Connection connectToDB() {
  
      try {
  
          connection = DriverManager.getConnection(dbURL, user, password);
  
          return connection;
  
      } catch (SQLException ex) {
          System.out.println("SQL exception - connectToDB(): " + ex.getMessage());
          return null;
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Simply explained: I just need to create virtual derby database which will be created every time at the program start. 
  I don't know, how to do it in IntelliJ.
  I've added <code>DERBY_HOME</code> to the enviroment variables and also added path to Derby. Now this error is thrown by IntelliJ: <a href="http://imageshack.com/a/img547/3540/8puq.jpg" rel="nofollow">Error window</a></p>
  
  <p>Thank you very much for your help and time</p>