• Cannot log in; unable to start repository

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #12543  by jgiordano
 
Hello,

I am running OpenKM 5.1 on Windows XP. When JBoss is starting up, I see errors similar to this:
Code: Select all
2011-10-11 13:05:21,750 ERROR [org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager] failed to read bundle: deadbeef-cafe-babe-cafe-babecafebabe: java.lang.IllegalArgumentException: Invalid namespace index: 1231614
2011-10-11 13:05:21,781 ERROR [org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager] failed to read bundle: deadbeef-cafe-babe-cafe-babecafebabe: java.lang.IllegalArgumentException: Invalid namespace index: 1236653
2011-10-11 13:05:21,781 ERROR [org.apache.jackrabbit.core.RepositoryImpl] Failed to initialize workspace 'default'
javax.jcr.ItemNotFoundException: failed to build path of deadbeef-cafe-babe-cafe-babecafebabe: deadbeef-cafe-babe-cafe-babecafebabe: deadbeef-cafe-babe-cafe-babecafebabe
...
2011-10-11 13:05:22,250 ERROR [org.apache.jackrabbit.core.RepositoryImpl] Unable to start repository, forcing shutdown...
2011-10-11 13:05:22,250 INFO  [org.apache.jackrabbit.core.RepositoryImpl] Shutting down repository...
2011-10-11 13:05:22,250 INFO  [org.apache.jackrabbit.core.query.lucene.IndexMerger] IndexMerger terminated
...
2011-10-11 13:05:22,937 INFO  [org.apache.jackrabbit.core.RepositoryImpl] Repository has been shutdown
2011-10-11 13:05:22,937 ERROR [org.apache.jackrabbit.core.RepositoryImpl] failed to start Repository: failed to build path of deadbeef-cafe-babe-cafe-babecafebabe: deadbeef-cafe-babe-cafe-babecafebabe
The login page comes up normally, but when I enter a valid user name and password and click Login, I get the error message, "java.lang.ClassCastException: javax.jcr.ItemNotFoundException cannot be cast to javax.jcr.LoginException." Any idea how to fix this? Any and all help is greatly appreciated.
 #12578  by jllort
 
Seems it has been a problem with repository creation ( or some problem with repository ). It's new installation ? Which java version are you using and finally with OpenKM version are you trying ?
 #12614  by jgiordano
 
I was able to reproduce the problem with a new installation of OpenKM. It happens after an external process accesses the repository; somehow, it leaves the repository in a state where OpenKM cannot access it, but the external process still can. The external process logs in to the repository, accesses some content, then logs out. I was able to solve the problem by overwriting the entire repository with the repository from a fresh install. Obviously, we lost all our documents in the process, but that was OK since it was just a development environment. In general, we can prevent the problem by not allowing the external process to access the repository, but, if possible, I would like to know if there is a better way to solve the problem than overwriting the repository, in case this problem ever happens in production.

This is a fairly new installation of OpenKM 5.1.7 running on Java 1.6. Thanks for your help.
 #12648  by jllort
 
I want to understand what's "external process accesses the repository", could you explain better.
 #12701  by jgiordano
 
It was just a test application. Here is the code:
Code: Select all
public static void main(String[] args) throws Exception { 
		
		String repositoryPath = "C:\\jboss-4.2.3.GA\\repository";
		File repositoryFile = new File(repositoryPath);
		RepositoryConfig config = RepositoryConfig.create(repositoryFile);
		Repository repository = RepositoryImpl.create(config);
		
		Session session = repository.login();
		
		try { 
			String user = session.getUserID(); 
			String name = repository.getDescriptor(Repository.REP_NAME_DESC); 
			System.out.println("Logged in as " + user + " to a " + name + " repository."); 
			
			Node rn = session.getRootNode();
			Node okmRootNode = rn.getNode("okm:root");
			Node docNode = okmRootNode.getNode("File 1.txt");
			System.out.println(docNode.toString());
		} finally { 
			session.logout(); 
			System.out.println("Logged out.");
		} 
	} 
 #12709  by jllort
 
Ufff, only can be one repository instance started at same time ... if you want this kind of testing must starting repository from the source code too.
If you've got aplication server started and then execute it, really you'll got problems.

Let's advance in other direction, what's your finally purpose ?
 #12711  by jgiordano
 
Thanks for your reply. We just wanted to see if it was possible for an application to access the repository independently of OpenKM, but it is not a big requirement; I believe we can accomplish everything we need to do with workflows. I was just surprised that after this little test app accessed the repository, OpenKM was no longer able to access it, even after restarting jboss and the server itself. I assume that some information is persisted to the database, and that it was overwritten when we copied the empty repository over it. In general, is there a better way to fix that problem than overwriting the repository?
 #12713  by jllort
 
In fact there's only one repository instance, what you're trying is like two database instance serverces have opened the same files ( same database ) that's not good scenario. The idea of having esposed all API is basically to accessing core services on a transparent way.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.