title: Worklight 6.0 does not start on Liberty - HSQLDB
body: <p>I have followed the infocenter docs to setup Worklight on Liberty and Oracle Database all on Windows 2008. 
  (<a href="http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/devref/t_transporting_apps_and_adapters.html" rel="nofollow">http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/devref/t_transporting_apps_and_adapters.html</a> - Deploying IBM Worklight applications to test and production environments)</p>
  
  <p>When I start the liberty server, I get this error on the browser</p>
  
  <p>Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationFilter.doFilter:110' 
  javax.servlet.ServletException: Worklight Project not initialized</p>
  
  <p>at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
  at [internal classes]</p>
  
  <p>Going thru the logs, it shows it did not start because the HSQLDB driver is not found.</p>
  
  <p>The server.xml has the following:</p>
  
  <pre><code>&lt;application id="finance" name="finance" location="finance.war" type="war"&gt;
   &lt;classloader delegation="parentLast"&gt;
   &lt;commonLibrary&gt;
   &lt;fileset dir="${shared.resource.dir}/worklight/lib" includes="worklight-jee-library.jar"/&gt;
   &lt;/commonLibrary&gt;
   &lt;/classloader&gt;
  &lt;/application&gt;
  
  &lt;library id="worklight/OracleLib"&gt;
   &lt;fileset dir="${shared.resource.dir}/worklight/oracle" includes="*.jar"/&gt;
  &lt;/library&gt;
  
  &lt;!-- Declare the IBM Worklight Console database. --&gt;
  &lt;dataSource jndiName="worklight/jdbc/WorklightDS" transactional="false"&gt;
    &lt;jdbcDriver libraryRef="worklight/OracleLib"/&gt;
    &lt;properties.oracle driverType="thin" URL="jdbc:oracle:thin:@localhost:1521:ORCLWL" user="WORKLIGHTDIS" password="WORKLIGHTDIS"/&gt;
  &lt;/dataSource&gt;
  </code></pre>
  
  <p>I took a step further and checked how the WAR file links to database jndi entries. Going thru the web.xml file I found this:</p>
  
  <pre><code>&lt;resource-ref&gt;
  &lt;description&gt;Worklight Server Database&lt;/description&gt; 
  &lt;res-ref-name&gt;jdbc/WorklightDS&lt;/res-ref-name&gt; 
  &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt; 
  &lt;res-auth&gt;Container&lt;/res-auth&gt; 
  &lt;/resource-ref&gt;
  </code></pre>
  
  <p>The res-ref-name is slightly different from what is declared in the server.xml. Bear in mind that these entries were created by the ant script. This seems to be inconsistent from what the war file contains (created by the WL Studio).</p>
  
  <p>Anyway I gave it a try and changed the server.xml jndi entry to be exactly the same as the web.xml entry (jdbc/WorklightDS). When I restarted the liberty server It did not change the final result at all. The error message and the HSQL driver thing kept showing in the log.</p>
  
  <p>This is the exception</p>
  
  <pre><code>nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: Class                 org.hsqldb.jdbcDriver not found in Worklight platform or project /finance
  at  org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
  </code></pre>
  
  <p>Later on I found out that if I change the  element in the server.xml to be worklight value for all atributes it works. How odd it is.</p>
  
  <pre><code>&lt;application id="worklight" name="worklight" location="finance.war" type="war"&gt;
  </code></pre>
  
  <p>Please, any help is much appreciated to help me understand and fix it.</p>