Notes on Bodington

Well, not actually *on* Bodington. More like about Bodington. I’ve downloaded the sucker and am trying to install it, and am having success. Since I’ve not found much in the way of help in any of the official channels (, etc.), I thought I’d post my notes here.

So again, this isn’t a HowTo. This is a What I am doing and probably doing wrong with lots of dead ends but here ya go, take it with a grain of salt.

First, go to the home page. In the upper right of the page there is a news block, and a link announcing the release of version 2.8. Clicking that link takes you to this sourceforge page. This page has a great bit of instructions on how to download and install Bodington. Quoting:

File releases are available at:

There are two options:

1. bodington_war: This is main Bodington application. To use this, you should copy bodington.war to
your servlet container’s webapp root (you may need to either restart or reload it, depending on your
container’s instructions). You must then create and configure a supported database before you can
use the Bodington application.

Okay, I have been using Tomcat for years now, but I never quite got the hang of that part where they say “drop the war file into your servlet conainer’s webapp root and you’re good to go.” I did that, and nothing happened. My tomcat (version 5.5, but through the goodness of Gentoo I also have 6 available if push comes to shove) manager showed that bodington was indeed available as a service, but it refused to start it, and the tomcat log file complained of null pointers and so on.

So, brute force being a favorite tool of mine, I just unzipped the bodington.war file in the webapp directory. Do something like

cd /tmp # or wherever you've downloaded bodington

You should now have a file /tmp/bodington.war. Time to unjar that into your webapp directory.

su - # log in as root so that you can stomp all over your tomcat directories
cd /var/lib/tomcat-5.5/webapps # or wherever your tomcat webapp root is located
mkdir bodington
cd bodington
jar xvf /tmp/bodington.war

So my first mistake at this point was not immediately chowning all that unjarred webapp stuff to tomcat. I don’t really like letting my webserver have write rights to its applications, so I tend only to do that on an as-needed basis (upload directories, and so on). But in this case, I have no idea to which files and directories bodington needs write access. So a quick fix is to just chown the lot as your tomcat user. In my case, I did:

cd /var/lib/tomcat-5.5/webapps
chown -R tomcat:users bodington

Please if you are an experienced sysadmin, do your own thing and set the permissions properly. Of course, experienced sysadmins are probably not reading this, and the blind are leading the blind, etc etc.

So at this point, you should have a web application under the bodington directory, and it is time to futz with the WEB-INF stuff.

cd /var/lib/tomcat-5.5/webapps/bodington/WEB-INF
ls -lrt
drwxr-xr-x 2 tomcat users 4096 May 23 15:27 keystore
drwxr-xr-x 3 tomcat users 4096 May 23 15:27 bodington-sp
drwxr-xr-x 3 tomcat users 4096 May 23 15:27 template_classes
-rw-r--r-- 1 tomcat users 401 May 23 15:27
-rw-r--r-- 1 tomcat users 7144 May 23 15:27 ldap-authenticator.xml
drwxr-xr-x 2 tomcat users 4096 May 23 15:27 jsp
-rw-r--r-- 1 tomcat users 1654 May 23 15:27
drwxr-xr-x 5 tomcat users 4096 May 23 15:27 config
-rw-r--r-- 1 tomcat users 500 May 23 15:27 banned_agents.txt
-rw-r--r-- 1 tomcat users 8 May 23 15:27 adminpw.txt
drwxr-xr-x 2 tomcat users 4096 May 23 15:27 xslt
-rw-r--r-- 1 tomcat users 5879 May 23 15:27 web.xml
drwxr-xr-x 2 tomcat users 4096 May 23 15:27 lib

adminpw.txt looked interesting, so I did a “cat adminpw.txt” found a word. So I changed it to some other word, figuring it was an admin password, and therefore a security hole.

Next I had an idea what should look like, given that I use the same log system (does everybody use log4j), and I figured that I’d probably also have to edit and save So I opened both in emacs (by the way, emacs-cvs version 23.0 r6 in Gentoo builds a version of emacs that *finally* has antialiased text).

I changed to the following

log4j.rootLogger=WARN, A1

# default is set to be a ConsoleAppender. I want a rolling file appender
log4j.appender.A1.layout.ConversionPattern=%p %t %c – %m%n
Then I hacked at the file. This file contains definitions for the jdbcuserstore used for the minildap implementation. I’ve never used ldap, so I figured it was best to tread carefully. However, I’m also on a Linux box and will never be attaching to a microsoft database product of any sort. So I created a user and database in PostgreSQL as follows.

createuser -U postgres -P boddbuser # follow the prompts to your satisfaction
createdb -U boddbuser boddb

Then I edited to read (obviously inserting the correct password):

jdbcuserstore.classname = org.postgresql.Driver
jdbcuserstore.url = jdbc:postgresql://localhost:5432/boddb
jdbcuserstore.user_name = boddbuser
jdbcuserstore.password = myboddbuserpassword

Later on in the process, I found out that the bodington distribution did not contain the jar files for postgresql. So I had to go back and add it in. To save some headache, at this stage you can change into the lib file and insert them yourself. Here’s what I did (I user maven2 for all my Java development, so the .m2 reference is my maven2 repository):

cd /var/lib/tomcat-5.5/webapps/bodington/WEB-INF/lib
cp /home/james/.m2/repository/postgresql/postgresql/8.2-504.jdbc3/postgresql-8.2-504.jdbc3.jar .
cp /home/james/.m2/repository/javax/sql/jdbc/2.0/jdbc-2.0.jar .
cp /home/james/.m2/repository/javax/sql/jdbc-stdext/2.0/jdbc-stdext-2.0.jar .
cp /home/james/.m2/repository/jndi/jndi/1.2.1/jndi-1.2.1.jar .
cp /home/james/.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar .
cp /home/james/.m2/repository/postgis/postgis/1.2.1/postgis-1.2.1.jar .

I’m guessing that I will never use any of these jars except the postgresql one, but it costs me nothing to copy them in now. I’ve used struts and torque, and these are the common jar files that are slurped in by maven dependencies. The PostGIS library I am including because I always end up doing something spatial eventually, so why not.

As I recall, I had to download the javax jars directly from Sun, as their license has some sort of no distribution clause.

Anyway, at this point I fired things up and got part of the way through the install bit, and had a problem, so I’ll fix that now in HowTo land.
I also hadn’t chowned the directories to tomcat, so perhaps that alone will fix it, but perhaps not, and I don’t want to try it and see.
So, before you fire up tomcat, change back to the WEB-INF directory and add a file:

cd /var/lib/tomcat-5.5/webapps/bodington/WEB-INF
cd ..
chown -R tomcat:users *

(The last chown is needed only if you were editing things as root, not as your tomcat user. )

So at this point, you can stop and start tomcat.

/etc/init.d/tomcat-5.5 stop
* Stopping Tomcat ... [ ok ]
/etc/init.d/tomcat-5.5 start
* Starting Tomcat ... [ ok ]

bodington boot screen I had no problems at this point getting bodington up on my server. I pointed firefox at “http://localhost:8080/bodington” and got the page shown. The first link on page is for configuration, so I followed it. I only had three problems. First the installer couldn’t find or create file until I created it and chowned it to tomcat. Second, the installer couldn’t find a PostgreSQL database adapter until I slotted in the jar file and restarted the tomcat server. Third, when I finished the install process, Bodington refused to start, complaining about missing templates or some such. So that’s why I chowned the whole webapp tomcat:users—doing so fixed things and everything ran fine. Again, if you know how to drop things into Tomcat properly, you probably won’t have any of these problems.

Okay, this is long enough for one post. I am next going to configure Bodington, and I’ll post on that process later tonight.


One thought on “Notes on Bodington

  1. Congratulations on getting Bodington up and nice writeup. The mailing list (SourceForge) has quite a few people on it who would be happy to help if you have any questions. Happy Hacking.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s