Hi,

https://issues.apache.org/jira/browse/JCR-2203 should fix this problem.

regards
 marcel

On Thu, Jul 9, 2009 at 12:25, Dominique
Pfister<[email protected]> wrote:
> Hi,
>
> I was able to find out how those "repository" and "repository.xml" are
> created; it is actually a combination of tests:
>
> o.a.j.test.api.RepositoryFactoryTest#testDefaultRepository:
> instantiates a TransientRepository with home=null/config=null and
> o.a.j.core.RepositoryFactoryImpl registers this repository in its
> static REPOSITORY_INSTANCES map, with key=null.
>
> o.a.j.core.integration.RepositoryFactoryImplTest#testDefaultRepository:
> sets system properties with
> home=target/repository/config=target/repository.xml and asks
> o.a.j.core.RepositoryFactoryImpl to get or create a repository with
> key=null. Unfortunately, the transient repository registered above is
> still in the map and therefore this test inadvertently uses the wrong
> repository, which will create those file system entries.
>
> This can be reproduced by creating a read-only file "repository", and
> running the two tests in sequence. I then get failures with stack
> trace:
>
> javax.jcr.RepositoryException: Invalid repository configuration file:
> repository.xml
>        at 
> o.a.j.core.TransientRepository$2.getRepository(TransientRepository.java:230)
>        ...
> Caused by: o.a.j.ConfigurationException: Repository directory
> repository does not exist
>        at o.a.j.core.config.RepositoryConfig.create(RepositoryConfig.java:174)
>        ...
>
> I don't know exactly where this should be fixed: use system properties
> in RepositoryFactoryTest as well or provide some clean up in
> RepositoryFactoryImpl's REPOSITORY_INSTANCES map. Marcel, can you (or
> Julian) take a look at this?
>
> Regards
> Dominique
>
>
> On Tue, Jun 30, 2009 at 11:28 PM, Tobias Bocanegra<[email protected]> wrote:
>> hi,
>>
>>> For some reason the Hudson build creates an unexpected ./repository
>>> directory (not ./target/repository) that gets flagged by RAT. I'm not
>>> yet sure what causes that, but for now I simply added an extra RAT
>>> exclude rule that should make the Hudson build succeed again.
>>
>> it's not just the hudson build - i have those "repository" and
>> "repository.xml", too.
>> i guess it's one of the tests that does not use the proper repository home.
>>
>> regards, toby
>>
>

Reply via email to