jackrabbit-users mailing list archives

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

Thanks everyone for all your help.. I think I see the problem..

I think Mark H. was getting at this in his post.

If you notice I make a cast to TransientRepository and call shutdown()

The javadocs say for class org.apache.jackrabbit.core.TransientRepository
void 	shutdown()
          Forces all active sessions to logout.

Which is not the same as the call Mark mentions below in interface 

void 	shutdown()
          Shuts down the repository.

So... To me this means that org.apache.jackrabbit.core.TransientRepository is 
not actually implementing org.apache.jackrabbit.api.JackrabbitRepository 
correctly since it doesn't shutdown the repository only logs out all sessions 
(is that equivalent?).

So somewhere else in the jackrabbit arsenal, there is probably an 
implementation that does explicitly shut it down, no?

Anyway I'm doing more tests.. thanks again for the suggestions!

Carl Furst
CMS Developer
MLB Advanced Media, LLP.

-----Original Message-----
From: Mark Herman [mailto:MHerman@NBME.org]
Sent: Thursday, August 18, 2011 11:34 AM
To: users@jackrabbit.apache.org
Subject: RE: .lock file found repository not shutdown properly.

I can't help much, but going by [1] you shouldn't expect any exceptions
thrown as they will just be logged, and then [2] could explain why you don't
get any log messages.  Maybe try shutting down the repository without
shutting down tomcat and see if you get any more helpful log messages?

[2] http://marc.info/?l=log4j-user&m=120897082320333

-----Original Message-----
From: Furst, Carl [mailto:Carl.Furst@mlb.com]
Sent: Thursday, August 18, 2011 11:08 AM
To: users@jackrabbit.apache.org
Subject: .lock file found repository not shutdown properly.

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 process.

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