finally found the problem - this has nothing to do with the version of any 
components I use, Jackrabbit or Spring.

I load myservlet-servlet.xml using Spring's ContextLoaderListener in web.xml; 
myservlet-servlet.xml  <import> other configuration files. This causes the 
'lock' problem because I think beans are then initialized twice. 

What I did was to load myservlet-context.xml in ContextLoaderListener instead. 
myservlet-context.xml imports other configuration files. 
myservlet-servlet.xml is anyway automatically loaded by the servelet container. 


Alex is right, 'someone' else is started already, causing the conflict.
rgds,
canal




________________________________
From: go canal <[email protected]>
To: [email protected]
Sent: Friday, August 28, 2009 11:00:10 AM
Subject: Re: Error creating bean with name 'jackrabbitRepository' ......Thee  
repository home C:\Spring3Repo appears to be in use since the file named  .lock 
is already locked by the current process.

this is strange ..

did more test, 
my original configuration is ok: Eclipse 3.5 + Spring 2.5.6 + Jackrabbit 1.5.6 
+ Spring JCR Module + Derby
then I change this to Eclipse 3.5 + Spring 2.5.6 + Jackrabbit 1.6 + Spring JCR 
mmodule + H2, still ok.
(I do see the .lock file created in the repo folder though)

then I stop this, delete all the files (db and repo), and start the Spring 3.0 
configuration, still saw same msg saying the repo is locked - indeed there is a 
.lock file created.... but wondering why it was ok in a differerent 
configuration, I will be surprise that Spring checks this..

I also compared the jars file I used, I think both configuration are the close 
enough- well, I replaced Hibernate with iBatis, but should not create this 
problem...

there is something I overlooked ? really lost....

rgds,
canal




________________________________
From: go canal <[email protected]>
To: [email protected]
Sent: Friday, August 28, 2009 8:01:09 AM
Subject: Re: Error creating bean with name 'jackrabbitRepository' ......Thee  
repository home C:\Spring3Repo appears to be in use since the file named  .lock 
is already locked by the current process.

I am not so sure but unlikely. 

I restart Eclipse, then start the web application, still the same problem. 
There is a  .lock file created in the repo folder.

rgds,
canal




________________________________
From: Alexander Klimetschek <[email protected]>
To: [email protected]
Sent: Friday, August 28, 2009 4:45:41 AM
Subject: Re: Error creating bean with name 'jackrabbitRepository' ......Thee  
repository home C:\Spring3Repo appears to be in use since the file named  .lock 
is already locked by the current process.

On Thu, Aug 27, 2009 at 6:52 PM, go canal<[email protected]> wrote:
> javax.jcr.RepositoryException: The repository home C:\Spring3Repo appears to 
> be in use since the file named .lock is already locked by the current process.

This error comes up when there is already another Jackrabbit instance
running and accessing the repository at that location. Maybe an old
JVM is still running?

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]


      

Reply via email to