Sakai on Tomcat 6 – revisited

Recent discussions on the sakai-dev list prompted me to revisit the idea of running up Sakai on Tomcat 6.

Currently, the Sakai Maven Plugin defaults it’s deployment to the Tomcat 5.5 directory structure, ie shared/lib etc. In Tomcat 6 however, all of the library and class directories have been collapsed into a single /lib directory.

This JIRA suggests that the Sakai Maven Plugin can actually deploy into the Tomcat 6 layout. My past experiments weren’t as successful.

However, it’s possible to adjust the Tomcat 6 configuration to restore the old directory layout by adjusting the conf/catalina.properties.

In Tomcat 6, the configuration is:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
server.loader=
shared.loader=


So we can restore it to the Tomcat 5.5 behaviour by setting it like so:

common.loader=${catalina.home}/common/classes,${catalina.home}/common/i18n/*.jar,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar
server.loader=${catalina.home}/server/classes,${catalina.home}/server/lib/*.jar
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

Theoretically we can then just build, deploy and startup Sakai in Tomcat 6 just like before:
mvn clean install sakai:deploy -Dmaven.tomcat.home=$TOMCAT_SAKAI_TRUNK

And the result:

[INFO] BUILD SUCCESSFUL
[INFO] ——————————————
[INFO] Total time: 6 minutes 48 seconds
[INFO] Finished at: Wed Jun 30 09:04:09 EST 2010
[INFO] Final Memory: 182M/340M
All good so far. Lets startup:
./sakai trunk start

The result:

SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.sakaiproject.dav.DavRealm
SEVERE: Context [/podcasts] startup failed due to previous errors
Jun 30, 2010 9:12:08 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor portal.xml
Jun 30, 2010 9:12:08 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 30, 2010 9:12:08 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/portal] startup failed due to previous errors
Jun 30, 2010 9:12:08 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive access.war
Jun 30, 2010 9:12:08 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

 


Failure. None of the components/ are loaded so every webapp fails to start.

More on this to come.

 

Advertisements