jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Furst, Carl" <Carl.Fu...@mlb.com>
Subject .lock file found repository not shutdown properly.
Date Thu, 18 Aug 2011 15:07:35 GMT
Hey all,

I have a strange issue I was wondering if someone could give me some clues
about. I'm running a deploy model 1 jcr jackrabbit repository on tomcat 6.

I have a context listener doing  operations when the server starts up and
shuts down. As you may know the default behavior for Tomcat on shutdown is
to actually pause the listeners, but keep the jvm running, and not allow any
connections to any of the ports it listens on to whatever hostname its bound

So when I do a shutdown, my context listener executes the following:

	try {
		Repository resp = JcrUtils.getRepository();
		if (resp != null)
			log.debug("shutting down reps");
			((TransientRepository) resp).shutdown();
	} catch (Exception e) {
			log.fatal("Could not stop repository: " , e);	
	finally {
			log.info("Video killed the repository star");

So, I don't see an exception caught in my logs yet, I do see "shutting down

I see the following message in catalina.log:

log4j:ERROR LogMananger.repositorySelector was null likely due to error in
class reloading, using NOPLoggerRepository.

so when I start the server, my context listener opens the repository and
registers the custom node types I use with it. When this happens, I get the
following message:

2011-08-18 10:42:32.987 WARN  [main] RepositoryLock.java:134
Existing lock file /absolute/path/to/.lock detected. Repository was not shut
down properly.

Sometimes I get an JNDI error: 
Aug 18, 2011 11:01:20 AM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
javax.jcr.RepositoryException: The repository home
appears to be in use since the file named .lock is locked by another

This happens when I pause the server, with the jvm still running and then
un-pause it using the same jvm to access the repository.

How could that be given the code above? Any hints as to what I'm doing
wrong? Is there an explicit lock I need to attempt to release before I
shutdown the repository? Is this lock dependent upon other node locks that
might exist? 

At this point, I don't lock anything explicitly as I am still just trying to
get basic functionality working WRT the features I want to implement. 

Any help is appreciated.


Carl Furst
CMS Developer
MLB Advanced Media, LLP.

View raw message