[Yanel-dev] Initiating a JCR repo from within a Yanel resource
seems to be a problem because of locking ...
Michael Wechner
michael.wechner at wyona.com
Thu Nov 29 00:15:01 CET 2007
Hi
It seems like resources should also be allowed to be initiated once and
also destroyed at the start and stop of the webapp, because otherwise
one cannot start/stop a repository connection.
As a workaround I guess one could use a hidden realm which is starting
the special repository and then the resource can access this repo.
(please see below)
17300 2007-11-29 00:08:23,374 [http-8080-Processor24] WARN
org.apache.jackrabbit.core.util.RepositoryLock.acquire():111 - Existing
lock file /home/michi/src/wyona-svn/wyona/misc/foaf/jackrabbit/.lock
detected. Repository was not shut down properly.
17308 2007-11-29 00:08:23,382 [http-8080-Processor24] ERROR
org.wyona.yarep.impl.repo.jcr.JCRRepository.readConfiguration():326 -
The repository home /home/michi/src/wyona-svn/wyona/misc/foaf/jackrabbit
appears to be already locked by the current process.
javax.jcr.RepositoryException: The repository home
/home/michi/src/wyona-svn/wyona/misc/foaf/jackrabbit appears to be
already locked by the current process.
at
org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:146)
at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:229)
at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:521)
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
at
org.wyona.yarep.impl.repo.jcr.JCRRepository.readConfiguration(JCRRepository.java:313)
at
org.wyona.yarep.core.RepositoryFactory.newRepository(RepositoryFactory.java:187)
at
org.wyona.yanel.impl.resources.foaf.FOAFResource.getProfilesRepository(FOAFResource.java:180)
at
org.wyona.yanel.impl.resources.foaf.FOAFResource.getRDFAsInputStream(FOAFResource.java:169)
at
org.wyona.yanel.impl.resources.foaf.FOAFResource.getView(FOAFResource.java:94)
Cheers
Michi
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner at wyona.com michi at apache.org
+41 44 272 91 61
More information about the Yanel-development
mailing list