title: HSQL database: loading a particular Java classpath
body: <p>I have an in-memory HSQL database (v 1.8) up and running - I am able to connect to it using Java and run "<strong>CREATE TABLE</strong>" queries.</p>
  
  <p>I am trying to create &amp; run stored procedures and from the HSQL docs the way to do it is create an alias and have it point to a Java class. Then have the Java class do the necessary processing the stored procedure would do.</p>
  
  <p>I have created an alias in HSQL using something like the following statement -</p>
  
  <pre><code>CREATE ALIAS MySPROC FOR "com.mypackage.MyClass.myFunction"; 
  </code></pre>
  
  <p>Then I try to run this SPROC using a Java code like the following - </p>
  
  <pre><code>java.sql.CallableStatement stmt = cnt.prepareCall(storedProcedureCall);
  </code></pre>
  
  <p>Where cnt is of type java.sql.Connection.</p>
  
  <p>I am getting an error as follows -</p>
  
  <pre><code>java.lang.RuntimeException: java.sql.SQLException: Function not found com.mypackage.MyClass java.lang.ClassNotFoundException: com.mypackage.MyClass in statement [  CALL MySPROC(?,?,?)  ]
  at org.hsqldb.jdbc.Util.throwError(Unknown Source)
  at org.hsqldb.jdbc.jdbcPreparedStatement.&lt;init&gt;(Unknown Source)
  at org.hsqldb.jdbc.jdbcCallableStatement.&lt;init&gt;(Unknown Source)
  at org.hsqldb.jdbc.jdbcConnection.prepareCall(Unknown Source)
  etc.
  </code></pre>
  
  <p>What I understand is that I have to show HSQL the location of "<strong>com.mypackage.MyClass</strong>". </p>
  
  <p>How do I do that?</p>