Resource Menu

Subversion on Windows

I have installed subversion and LibreSource. Everything works well with LibreSource, except subversion.

I can create repositories from the command prompt and have setup the svnserve as a service.

However, when I attempt to create a subversion repository from LibreSource I get the following error:

Error in createRepository : null Caused by : null

The LibreSource command window has the following errors:

Caused by: java.lang.NullPointerException
        at org.libresource.subversion.ejb.LibresourceSubversionServiceBean.canCreateRepository(
        at org.libresource.subversion.ejb.LibresourceSubversionServiceBean.createRepository(
        … 65 more
Mon Sep 29 08:36:21 EST 2008 : root : ERROR : org.libresource.subversion.LibresourceSubversionException

This is how my config looks like: SVN is in the following folder: C:/SVN SVN repositories are in C:/Repositories I have created a folder called ls-svn under repositories: C:/Repositories/ls-svn

There are three folders under ls-svn:

  1. conf
  2. bin
  3. projects
I am using projects as my base folder for the LibreSource projects.

The conf directory contains:

  1. svnserve.conf
  2. authz
  3. passwd
The svnserver service was created with the following command line: sc create ls-svn binpath= ""C:SVNbinsvnserve.exe" service root C:Repositoriesls-svn" displayname= "LibreSource Subversion Repository" depend= Tcpip

The bin directory contains two files:

  1. SVNCreate.bat
  2. SVNMove.bat
Here's the content of SVNCreate.bat
@echo off

set basepath="C:repositoriesls-svnprojects"

if "%basepath%%1"=="%basepath%" ( echo Project name not provided! exit /B ) else ( svnadmin create "%basepath%%1" )

My LibreSource config file C:/LibreSource/JONAS_4_7_6/conf/ has the following settings for Subversion:

# custom web properties
  1. Subversion configuration
subversion.authz.file.path=C:/Repositories/ls-svn/conf/ subversion.repository.base.path=C:/Repositories/ls-svn/projects/ subversion.create.repository.cmd=C:/Repositories/ls-svn/bin/SVNCreate.bat subversion.rename.repository.cmd=C:/Repositories/ls-svn/bin/SVNMove.bat

I have tried to run it with both

  1. subversion.authz.file.path=C:/Repositories/ls-svn/conf/
  2. subversion.authz.file.path=C:/Repositories/ls-svn/conf/authz
The two options resulted in the same error. I did restart LibreSource after each change to the config file.

Having a look at the source code of the function where the error occurs, I can see (canCreateRepository()):

File repositoryDirectory = new File(getSVNRootRepositoryPath());
		return !Arrays.asList(repositoryDirectory.list()).contains(repositoryName);
So it looks to me like the repositoryDirectory is null.

How can I make sure that getSVNRootRepositoryPath is returning the right value?

Can someone please help shed a light at what I am doing wrong?

Thank you all.

posted by ebassil at Sep 29, 2008 1:01 AM