jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: Continuous Integration: Rapid Session creation\shutdown - javax.jcr.RepositoryException: xxx appears to be already locked by the current process.
Date Tue, 12 Apr 2011 19:46:32 GMT
Hi,

we had the same problem in Apache Sling - we now just wait two seconds
on shutdown of the test class. This gives the repository enough time to
shutdown and our problems were solved.

Regards
Carsten

Michael Anstis  wrote
> Hi,
> 
> We run a lot of JUnit tests during the CI build of our application.
> 
> These tests individually involve the following (some of which may or may not
> be relevant, but I include here for completeness):-
> 
>     * creating a TransientRepository,
>     * creating a Session,
>     * configuring repository with a few custom node types,
>     * running tests,
>     * shutting down repository with repository.shutdown()
> 
> The tests work fine when ran on a local PC, but when ran on a server we
> often encounter random (i.e. not consistent where they fall) errors
> "javax.jcr.RepositoryException: The repository home XYZ appears to be
> already locked by the current process."
> 
> I suspect the .lock file is not being cleared from the FileSystem before the
> next test starts to run and hence the lock error is thrown.
> 
> Can anybody recommend an approach to ensure the Repository has been
> completely shutdown and all FileSystem changes flushed?
> 
> I have posted the same question to Stackoverflow; I hope it does not present
> any problems.
> 
> Thanks,
> 
> Mike
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

Mime
View raw message