Child pages
  • Apache Roller on Geronimo (1.2 Ok)
Skip to end of metadata
Go to start of metadata

This article focuses on configuring Apache Roller v3.1 on the Apache Geronimo v1.2 server. Roller is a powerful and popular open source blog server and this document will walk you throw the configuration steps needed to get Roller up and running with the Derby or MySql database back-end on Geronimo. For detailed information on the usage of JDBC in Geronimo, refer the Simple database access sample application (1.2 Ok) article.

After reading this article you should be able to configure the Geronimo application server for the Apache Roller application with any of the Roller supported databases back-ends.

Apache Roller resources

If you do not already have access to the roller v3.1 application here is:

Included in the apache roller bundle above is database scripts for db2, derby, hsqldb, mysql, mssql and oracle. You will find the scripts in apache-roller/webapp/roller/WEB-INF/dbscripts/

Configuring, Building and Deploying the Apache Roller application

Make sure you read the roller-install-guide for detailed instructions on setting up Apache Roller. The following is mostly Geronimo specific configuration instructions.

Preparing the resources

If you are planing on experimenting with or later upgrade this Roller Geronimo setup you should probably let ant or Maven handle most of the setup but for simplicity this document will use a manual approach.

  • Unpack the apache-roller-3.1 and required-jars-roller-3.1 into a common working directory (make sure the required jars end up in the roller /WEB-INF/lib directory)
  • Place the geronimo-web.xml (see below) alongside with the web.xml file in the roller/WEB-INF/ directory
  • Place the (see below) file alongside with the file in the roller /WEB-INF/classes directory.

You will later re-pack the roller/... directory into a roller.war file but first we need to set up the database.


Creating and Populating the Roller Derby Database

You will find a create.db file in the roller/WEB-INF/dbscrips/ directory. This document will use and set up the derby database but you should be able to use any of the roller supported databases and as a alternative setup you will also find the mysql database pool below.

After starting Apache Geronimo log into the console and follow the given steps to create the rollerdb database.

  1. In the console select the DB Manager link in the Console Navigation panel on the left.
  2. Give the database name as rollerdb and click Create button.
  3. Select rollerdb in the Use DB field.
  4. Open createdb.sql in the dbscrips/derby directory from a text editor.
  5. Paste the content createdb.sql into the SQL Commands text area and press Run SQL button.

Deploying Database Connection Pool Plan

The Roller application is going to access the rollerdb through a connection pool. Below you will find the steps to deploy the the roller database connection pool.

  1. In the console Click on Deploy New link in the Console Navigation panel.
  2. Load the tranql-connector-ra-1.3.rar into the Archive input box from the <geronimo_home>/repository/org/tranql/tranql-connector-ra/1.3/tranql-connector-ra-1.3.rar location.
  3. Load the roller-derbydb-plan.xml into the Plan input box.
  4. Press the Install button to deploy the connection pool into the server.

Building and deplpoy the Geronimo ready roller.war

Use the Java jar tool to reassemble your working area from the roller directory down naming it roller.war. Deploying Roller application is pretty straight forward as we are going to use the Geronimo Console.

  1. Click the Deploy New link on the Console Navigation panel.
  2. Load the roller.war file into the Archive input box.
  3. Press Install button to deploy the roller application in the server.

Alternative database setup (MySql)

This is the MySql rollerdb plan just change the hibernate dialect setting in the re-pack the roller.war, create, build the database, deploy the plan and you will have roller up and running with the mysql database back end in minutes.


Some problems and there solution

Hopefully this section eventually can be removed but at this writing there are a couple of things to look out for fortunately there are solutions. If you hit the following problem wile running Roller on Geronimo you should upgrade to a newer build of Geronimo 1.2 as this problem has been addressed by the developers.

Geronimo log message

If this error shows up in your Geronimo log wile starting Roller you are running in to a hibernate property loading problem. Hibernate is swalowing the activemq properties witout checking it first (this has been addressed in a newer versions of hibernate (3.2)).

Geronimo log message

As Roller v3.1 is using hibernate v3.1 one (of at least 2) solution to this is to turn of activemq. This can be done by editing the /var/config/config.xml (make sure Geronimo is not running wile editing the file) and module load="false" the activemq-broker and activemq modules. If you need activemq running the solution should be to use a second set of properties for acitvemq (that dose not use a hash).

Maybe someone with knowledge about activemq and its properties could fill in the blanks

  • No labels