Sventon looses configuration after Tomcat restart on Ubuntu

Intro


Sventon is a web GUI for SVN repositories browsing. I have recently set it up for the Engineering team in my company. I configured it according to official instructions and everything was working just fine. But then, after restarting the underlying Tomcat servlet container my configuration was lost! How come?

I spent a lot of time troubleshooting that and it has finally occured that the Sventon by default stores its configuration in Tomcat servlet container temp directory. What an absurdity? It's obvious that the configuration will be lost each time you restart the Tomcat servlet container now.

I've then found couple of topics on the Sventon support forum regarding the above issue, but it looks like its developers doesn't consider it as a bug claiming that different servlet container may behave diversely. The only think that I can do then is to share the exact instruction of how to bypass the above issue hoping that it will save hours of work of some who read it.

Configuration


Once you've installed and configured Sventon according to the following instructions, please use the below steps to save its configuration in other location than Tomcat servlet container temp directory:

1) Edit the applicationContext.xml file inside the Tomcat servlet container webapps/svn/WEB-INF (/var/lib/tomcat7/webapps/svn/WEB-INF/applicationContext.xml in my case) directory and change the following line:

<bean id="sventonTempRootDir" class="java.io.File">

to:

<bean id="sventonTempRootDir" class="/etc/">

2) Create /etc/sventon_config directory and assign RW right for the user that the Tomcat servlet container runs in the system.

3) Copy the content of Tomcat servlet container temp directory (/tmp/tomcat7-tomcat7-tmp/sventon_config/ in my case) into the newly created directory. Make sure that you have a proper permissions set up.

You can safely restart the Tomcat servlet container now.

No comments:

Post a Comment