After a complete reinstall of both Labkey and Tomcat (purged the package first), and setting the proper permission I didn't see any errors concerning missing files and such.
Unfortunately, the DBCP problems persists.
After some further research it becomes clear debian doesn't use the dbcp included with the Apache Tomcat distribution, but instead uses the commons-dbcp. This means that 'org/apache/tomcat/dbcp/dbcp/BasicDataSource' is available as 'org/apache/commons/dbcp/BasicDataSource.class'. I read some hints in some posting that other distributions of Tomcat are doing the same or something similar.
This change happened in the 5.5.15 version of the debian package:
https://lists.ubuntu.com/archives/edgy-changes/2006-August/004578.html
More information is available from the Ubuntu bug report:
https://bugs.launchpad.net/ubuntu/+source/tomcat5.5/+bug/74781
Simply installing the missing naming-factory-dbcp.jar from the apache-tomcat binary file, as suggested in the bug-report, didn't work for some reason. It failed with a java.lang.ClassCastException.
Defining the DataSource factory to be used by Labkey didn't work either:
<Resource name="jdbc/labkeyDataSource" auth="Container"
type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
username="labkey"
password="lkcpas91"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost/labkey"
maxActive="20"
maxIdle="10" accessToUnderlyingConnectionAllowed="true"/>
It seems Labkey isn't using the factory configuration, which a quick search through the source code confirms.
Labkey is linking the library directly as is this example:
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/BasicDataSourceExample.java?view=markup
I'd say it should be possible to generalise access to the DataSource by using the factory definition in the config-file if it is defined. The linked example does seem to hint at it but doesn't provide a solution.
Next step is to figure out how this is done. But that will be a task for tomorrow, or perhaps you (adamr) have some ideas about that already.
Thanks for your help so far,
-Aschwin
ps. In case you are interested, I attached the log file as well.