Resource Menu


posted by Sebastien Jourdain at Oct 2, 2008 8:23 AM
Quote
You are welcome
posted by ebassil at Oct 2, 2008 7:04 AM
Quote
Hi Sebastien,

That's it… Like the Homer says DOOOHHHH!!!!

You have to use the following line in the property file.

subversion.authz.file.path=C:/Repositories/ls-svn/conf/authz

Great software. Very simple yet effective. I will defenitely be promoting it on my blog.

Cheers,

Emile

posted by Sebastien Jourdain at Sep 29, 2008 10:12 AM
Quote
In any java property file use / instead of \, or you should double your \ like that \\.
posted by ebassil at Sep 29, 2008 1:01 AM
Quote
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 : null

The 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:

  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/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
  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.