Child pages
  • Continuum on Tomcat
Skip to end of metadata
Go to start of metadata

Continuum on Tomcat

Continuum 1.1-SNAPSHOT on Tomcat 5.x and 6.x

These instructions explain how to deploy the (unreleased) Continuum 1.1-SNAPSHOT web application in an existing installation of Tomcat 5.x and Tomcat 6.x.

1. Build Continuum or obtain a pre-built snapshot.

2. Locate the continuum-webapp-1.1-SNAPSHOT.war file.
(If you built Continuum, it will be in continuum-webapp/target.)
(If you have downloaded Continuum, it will be in continuum-1.1-XXX/apps/continuum-plexus-application-1.1-XXX.jar/lib/.)

3. Add a context configuration file for the web application:

For Tomcat 5.0.x

<?xml version="1.0" encoding="UTF-8"?>
 <Context path="/continuum"

  <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/users">

  <Resource name="jdbc/continuum" auth="Container" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/continuum">

  <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/>
  <ResourceParams name="mail/Session">

For Tomcat 5.5.x

For Tomcat 6.0.x

<?xml version="1.0" encoding="UTF-8"?>
 <Context path="/continuum"

 <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
           url="jdbc:derby:/path/to/data/database/users;create=true" />

 <Resource name="jdbc/continuum" auth="Container" type="javax.sql.DataSource"
           url="jdbc:derby:/path/to/data/database/continuum;create=true" />

 <Resource name="mail/Session" auth="Container"

WARNING: The Tomcat 5.5.20 release is missing MailSessionFactory and a few other classes. JNDI mail sessions will not work. Either use Tomcat 5.5.17 or see Bug 40668 for a workaround.

Tomcat JNDI Resources HOWTO

4. Place the following jars in $TOMCAT_HOME/common/lib(Tomcat 5.x) $TOMCAT_HOME/lib(Tomcat 6.x):
(click the links to download each jar from the central Maven repository)

5. Start Tomcat

6. Access the application at http://localhost:8080/continuum

Optional Configuration

  • Override the "To:" address for all mail sent from Continuum. Modify the <code><to-override></code> element in <code>$TOMCAT_HOME/webapps/continuum/WEB-INF/classes/META-INF/plexus/application.xml</code> and provide an alternate email address.
            Setting this propery will make Continuum send all emails to
            this address instead the address specified in the project


An ${appserver.base} directory is being created in $TOMCAT_HOME/bin

Derby Database File Locations

Instead of absolute paths, you can use a relative location for the database in the connection strings: jdbc:derby:users;create=true and jdbc:derby:continuum;create=true

To control where Derby creates the databases, "You define the system directory when Derby starts up by specifying a Java system property called derby.system.home." as described here : derby dev guide

Updating a Tomcat Deployment

In preparation for deploying a new snapshot of Continuum 1.1

Stop Tomcat, and delete the following files and directories:

  • $TOMCAT_HOME/webapps/continuum
  • $TOMCAT_HOME/work/Catalina/localhost/continuum

There may also be a $TOMCAT_HOME/bin/${appserver.base} directory. (This should not be happening.)


Thijs Schnitger says:

I had to add 2 JAVA_OPTS to my Tomcat startup script  to get it to work:
-Dplexus.system.path=$PATH to get Continuum to find the mvn and ant executables,
-Dappserver.base=$CATALINA_HOME to get the logfile in the right dir and remove the  ${appserver.base} dirs popping up in $CATALINA_HOME and the appBase of my Tomcat host.

My experiences with Continuum 1.2.3 on Tomcat 5.5.27

Jakub Holý says:

Deploying Continuum 1.2.3 to Tomcat 5.5.27 wasn't so straight-forward as just following the 5.5.x instructions therefore I'd like to share with you the knowledge how I got it working.

Environment: Java(TM) SE Runtime Environment (build 1.6.0_14-b08), OS Linux

1. Prepare Tomcat as per the 5.5.x instructions

Follow the standard instructions to setup the things you need.

  1. Use at least Java JDK 1.5.0_11 to run Tomcat w/Continuum.
  2. A defined xml section to define the JNDI resources.
  3. The JavaMail / Activation JAR files.
  4. The Apache Derby JAR files.
  5. Configure ${appserver.base} java property.

Install Continuum

  1. Download apache-continuum-1.2.3.war.
  2. Extract the content of the .war archive to $CATALINA_HOME/webapps/continuum/ (which should thus contain WEB-INF/, index.jsp etc.).

2. Modify $CATALINA_HOME/conf/Catalina/localhost/continuum.xml

If you followed also the Tomcat 5.5.x Specifics instruction, you have created the file  $CATALINA_HOME/conf/Catalina/localhost/continuum.xml. We will need to do some modifications to the file to avoid the following exception:

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /continuum does not exist or is not a readable directory
        at org.apache.naming.resources.FileDirContext.setDocBase(

Namely we will remove the attribute docBase and better also the unnecessary path since Tomcat can derive them from this file's name, partly thanks to the fact, that we have unpacked the .war into a folder of the same name as the desired context root and this file's name (continuum). Thus we will get


I've a bit more complicated setting of the SMTP server, maybe its basic setup (only setting is enough for you.

3. Solve a Derby issue

During Continuum startup (see logs/continuum.log) there were some exception due  to the schema "SA" not existing, this is a known issue and can be safely ignored. However after that the application failed to start due to the following exception:

ERROR JPOX.RDBMS.Schema  - Failed initialising database. Please check that your database JDBC driver is accessible, and the database URL and username/password are correct. Exception : Cannot create PoolableConnectionFactory (Failed to start database 'database/continuum', see the next exception for details.)
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Failed to start database 'database/continuum', see the next exception for details.)

Unfortunately there was no "next exception" with any details. At the end I've found out that the problem is due to the database being locked and not unlocked. You can reproduce the error by trying to connect to the database with some tool like DBViewr for Eclipse or SQuirreL SQL, the database is located (after the first startup that created it) under $CATALINA_HOME/database/continuum.

Solution: Stop Tomcat and delete the likely two *.lck files from  $CATALINA_HOME/database/continuum/.

Now you should be able to start Tomcat with Continuum and access it at  http://localhost:8080/continuum without problems.

  • No labels