Nexus on Tomcat 5.5 on Ubuntu Hardy

I’m trying out this Continuous Integration fun at the moment.

My end game is to get Hudson, Maven and Nexus working together to continuously build and run unit tests against code, which then gets turned in to Deb packages. A new Xen VM will then be created and configured using Puppet which the new Deb package is then deployed to. Finally Selenium will then be run to automate testing of the deployment.

Thats the plan anyway ..

I’ve been deploying everything on Ubuntu Hardy for the time being, and the latest app I am working on is Nexus. I’m deploying it as a War under Tomcat 5.5 and for a while was just getting the following error:


06-Mar-2009 20:29:08 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive nexus.war
06-Mar-2009 20:29:12 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
06-Mar-2009 20:29:12 org.apache.catalina.core.StandardContext start
SEVERE: Context [/nexus] startup failed due to previous errors

I hate that error. It’s rubbish. To make it a little more verbose I edited /var/lib/tomcat5.5/webapps/nexus/WEB-INF/log4j.properties and changed the rootLogger to DEBUG and fixed the appender path to go somewhere sensible (/var/log/tomcat55/nexus.log) and restarted Tomcat! This logged the following interesting error:


2009-03-06 20:42:01.066 ERROR [main:] - org.sonatype.nexus.configuration.application.source.ApplicationConfigurationSource:file:
******************************************************************************
* Could not create configuration file [ /usr/share/tomcat5.5/sonatype-work/nexus/conf/nexus.xml]!!!! *
* Nexus cannot start properly until the process has read+write permissions to this folder *
******************************************************************************
2009-03-06 20:42:01.091 ERROR [main:] - org.sonatype.nexus.Nexus:default: Could not start Nexus, bad IO exception!
java.io.FileNotFoundException: /usr/share/tomcat5.5/sonatype-work/nexus/conf/nexus.xml (No such file or directory)

Not exactly rocket science to see what is going on here!! And really easy to fix!


mkdir /usr/share/tomcat5.5/sonatype-work
chown tomcat55: /usr/share/tomcat5.5/sonatype-work

A quick restart of tomcat, after turning the logging back down to INFO and ta da! A working Nexus repo!

Leave a Reply

Your email address will not be published. Required fields are marked *