jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nigel Sim <nigel....@gmail.com>
Subject Trouble redeploying Tomcat webapp using Jackrabbit
Date Fri, 14 Aug 2009 05:08:25 GMT
Hi have a Tomcat app which gets a Jackrabbit instance via JNDI. When I try
to hot-redeploy the app it failes with the following:

javax.jcr.RepositoryException: The repository home
/data/repository/repository-home appears to be in use since the file named
.lock is already locked by the current process.
        at
org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:159)
...

Then if I shutdown Tomcat I have to clean up the lock file to start things
up again.

The JNDI resource is:
    <Resource name="jcr/repository" auth="Container"
type="javax.jcr.Repository"
        factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
        configFilePath="/data/repository/repository.xml"
        repHomeDir="/data/repository/repository-home" />

Do I need to do anything else to help jackrabbit shutdown and start up
properly in a Tomcat container.

On a similar note, during development I use mvn tomcat:run to run my webapp.
When I kill it with ctrl-c Jackrabbit again fails to shutdown properly, this
time with:

Exception in thread "Thread-6" java.lang.NoClassDefFoundError:
org/apache/jackrabbit/core/lock/LockManagerImpl$2
    at
org.apache.jackrabbit.core.lock.LockManagerImpl.save(LockManagerImpl.java:245)
    at
org.apache.jackrabbit.core.lock.LockManagerImpl.close(LockManagerImpl.java:186)
    at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doDispose(RepositoryImpl.java:2133)
    at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.dispose(RepositoryImpl.java:2069)
    at
org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:1131)
    at
org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:1081)
    at
org.apache.jackrabbit.core.jndi.BindableRepository.shutdown(BindableRepository.java:242)
    at
org.apache.jackrabbit.core.jndi.BindableRepository$1.run(BindableRepository.java:120)


I will be very thankful for any pointers/assistance with this.

Thanks
Nigel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message