title: How to use HSQLDB as a datasource in Websphere Application Server?
body: <p>I try to set up a local development infrastructure and I want to use <a href="http://hsqldb.org/" rel="nofollow">HSQLDB</a> as a datasource with my <strong>WAS 6.1</strong>. I already know that I have to use <a href="http://commons.apache.org/dbcp" rel="nofollow">Apache DBCP</a> to get a connection pooling, but I'm stuck when my application tries to get the first connection.</p>
  
  <p><strong>What I've done</strong></p>
  
  <p>In WAS I created a JDBC provider with the class <code>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</code> and removed everything from the classpath input field. Then I put <em>commons-dbcp.jar</em>, <em>commons-pool.jar</em> and <em>hsqldb.jar</em> in  <code>MYAPPSERVERDIRECTORY/lib/ext</code>.</p>
  
  <p>Then I created a new datasource with that provider. I added the following custom properties:</p>
  
  <ul>
  <li><code>driver=org.hsqldb.jdbc.JDBCDriver</code></li>
  <li><code>url=jdbc:hsqldb:file:///C:/mydatabase.db;shutdown=true</code></li>
  <li><code>user=SA</code></li>
  <li><code>password=</code></li>
  </ul>
  
  <p><strong>My Problem</strong></p>
  
  <p>When I run my application and the first connection to the database is made, I get the following exception:</p>
  
  <pre><code>---- Begin backtrace for Nested Throwables
  java.sql.SQLException: No suitable driverDSRA0010E: SQL-Status = 08001, Fehlercode = 0
  at java.sql.DriverManager.getConnection(DriverManager.java:592)
  at java.sql.DriverManager.getConnection(DriverManager.java:196)
  at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:205)
  at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:918)
  at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
  at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:955)
  at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1437)
  at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1089)
  at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1837)
  at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1568)
  at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2338)
  at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:909)
  at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:599)
  at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:439)
  at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:408)
  </code></pre>
  
  <p>Any tips on this? I suspect I'm using a wrong class from hsqldb, or maybe my JDBC url is wrong...</p>