I have a JackRabit JCR reporsitory in Spring Project.
When I try to start the aplication I get the following exception:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'repository' defined in ServletContext resource
[/WEB-INF/XXXShop-JCR.xml]: Initialization of bean failed; nested
exception is javax.jcr.RepositoryException: The repository home at
C:\Desarrollo\Billing\workspace\XXXShop\target\web\repo appears to be in
use since the file at
C:\Desarrollo\Billing\workspace\XXXShop\target\web\repo\.lock is locked
by another process.
javax.jcr.RepositoryException: The repository home at
C:\Desarrollo\Billing\workspace\XXXShop\target\web\repo appears to be in
use since the file at
C:\Desarrollo\Billing\workspace\XXXShop\target\web\repo\.lock is locked
by another process.
at
org.apache.jackrabbit.core.RepositoryImpl.acquireRepositoryLock(RepositoryImpl.java:322)
at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:197)
at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:483)
[...]
(before launching the application there's not .lock file in the repo folder)
This is my context configuration:
<bean id="sessionFactory" class="org.springmodules.jcr.JcrSessionFactory">
<property name="repository" ref="repository" />
<property name="credentials">
<bean class="javax.jcr.SimpleCredentials">
<constructor-arg index="0" value="bogus" />
<constructor-arg index="1">
<bean factory-bean="password"
factory-method="toCharArray" />
</constructor-arg>
</bean>
</property>
</bean>
<!-- create the password to return it as a char[] -->
<bean id="password" class="java.lang.String">
<constructor-arg index="0" value="pass" />
</bean>
<!-- configuring the default repository -->
<!-- normal factory beans params -->
<bean id="repository"
class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
<property name="configuration" value="classpath:repository.xml" />
<property name="homeDir" value="/repo" />
</bean>
If I use a TransientRepositoryFactoryBean instead of
RepositoryFactoryBean it works, but I want to have an instance of the
repository all the time ready for the JCR operaions.
Attached is my repository.xml
In this thread in the Spring Forum one of the maintainers says that the
issue is related to jackrabit.
http://forum.springframework.org/showthread.php?t=28592
What am I doing wrong?
Thanks in advance.
|