Hi,
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 : nullThe LibreSource command window has the following errors:
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.libresource.subversion.ejb.LibresourceSubversionServiceBean.canCreateRepository(LibresourceSubversionServiceBean.java:525)
at org.libresource.subversion.ejb.LibresourceSubversionServiceBean.createRepository(LibresourceSubversionServiceBean.java:141)
… 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:
- conf
- bin
- projects
I am using projects as my base folder for the LibreSource projects.
The conf directory contains:
- svnserve.conf
- authz
- 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= TcpipThe bin directory contains two files:
- SVNCreate.bat
- SVNMove.bat
Here's the content of SVNCreate.bat
@echo offset 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/libresourceConfig.properties has the following settings for Subversion:
# custom web properties
libresource.web.conf=C:/LibreSource/JONAS_4_7_6/work/webapps/jonas/LibreSource-2.5/LibreSource-Web-2.0/WEB-INF/libresource-web.xml
- 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
- subversion.authz.file.path=C:/Repositories/ls-svn/conf/
- 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.