jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nigel Sim <nigel....@gmail.com>
Subject Re: Trouble redeploying Tomcat webapp using Jackrabbit
Date Sat, 15 Aug 2009 04:27:57 GMT
Thank Alexander,

I think I agree with your analysis of the NoClassDefFound issue. However,
the locking issue seems to have no resolution. I am just using the example
from the Jackrabbit site,
http://jackrabbit.apache.org/application-bundle-howto.html , and I don't
think there is a way to explicitly shutdown a JNDI resource. I mean, I
though all JNDI resources were meant to clean themselves up, like
DataSources for JDBC.

For now I'm chalking this up to issues with the BindableRepositoryFactory,
but until I can do some deeper debugging I haven't really got much to file a
bug report on.

I was just hoping other doing hot-redeploys with Jackrabbit had hit this
same issue.

Thanks
Nigel

2009/8/15 Alexander Klimetschek <aklimets@day.com>

> On Fri, Aug 14, 2009 at 7:08 AM, Nigel Sim<nigel.sim@gmail.com> wrote:
> > 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.
>
> You must shutdown the repository before you can redeploy/restart it,
> to properly stop all threads and remove the lock. See
> TransientRepository.shutdown(). Not sure if this is possible in case
> of a JNDI based resource - Tomcat would need to be able to tell the
> resource to shutdown before hot re-deployment, since it is the one who
> creates it. But I am not a JNDI expert ;-)
>
>
> > 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)
>
> Hmm, either there is something broken in your jackrabbit jars or the
> classpath is already "closed down" while the shutdown is still in
> progress.
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>



-- 
JCU eResearch Centre
School Of Business (IT)
James Cook University

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