Page 1 of 1

Repository corrupted(?) after unexpected shutdown

PostPosted:Fri Jun 28, 2013 3:23 pm
by noxious
After an unexpected server failure, when i try to startup the app, the repository is reindexed and then I get this exception:
Code: Select all
com.openkm.core.RepositoryException: Directory was previously created with a different LockFactory instance; please pass null as the lockFactory instance and use setLockFactory to change it
I am using 5.1.11 version with file repository + MySql Database.
Is the repository corrupted?Can I do something to recover it, or will I have to restore a backup?

p.s. I found these relative issues but they are not so much helpful:
https://issues.apache.org/jira/browse/JCR-1879
https://issues.apache.org/jira/browse/JCR-2057
Any advice would be appreciated...

Re: Repository corrupted(?) after unexpected shutdown

PostPosted:Sat Jun 29, 2013 8:40 am
by jllort
Good news are that you got backup, that's excelent.

Before recover from backup. Stop openkm. Take a look into repository folder should be .lock files -> delete it if exists. Start openkm again and tell us if the error persist. Anyway go to administration -> there's and utility to check repository ( I'm not totally sure if in 5.x community the utility is present ).

Finally I suggest upgrade to 6.x OpenKM version for two reasons:
1- better perfomance -> in version 5.x the core is not based on jackrabbit that means we got full control of api and database table structure ( if you have take a look on database you have seen data is serialialized into table rows, that's a problem when you want to make some queries etc... ), in 6.x we have full openkm propietary database structure.
2- better perfomance ( tomcat and own database core ).

Re: Repository corrupted(?) after unexpected shutdown

PostPosted:Sat Jun 29, 2013 3:31 pm
by noxious
There ara no .lock files...
I guess there is an inconsistency between the db and the repository because during reindexing I get this error:
Code: Select all
2013-06-29 18:12:32,793 ERROR [org.apache.jackrabbit.core.query.OnWorkspaceInconsistency] Node /jcr:system/jcr:versionStorage/3e/76/ab/3e76abe1-34fe-4633-aca9-3d767c4b93ec/1.0 (fbe560de-772a-48c4-82c7-096c503dbe89) has missing child 'jcr:frozenNode' (872b5f48-2a06-4a6a-a4b1-2c116b4a7808)
2013-06-29 18:12:32,793 ERROR [org.apache.jackrabbit.core.RepositoryImpl] Failed to initialize workspace 'default'
javax.jcr.RepositoryException: Error indexing workspace: Error indexing workspace: Error indexing workspace...
So the inconistency is due to a missing node: 872b5f48-2a06-4a6a-a4b1-2c116b4a7808.
Is this node missing from my database or from the file repository?
Is there any way I could find and delete this node either from the db or the file repository, so that I could stop jackrabbit from searching it?
If the inconsistency is in a couple of nodes, I could afford finding and deleting them...

Re: Repository corrupted(?) after unexpected shutdown

PostPosted:Mon Jul 01, 2013 7:54 am
by pavila
This is an ugly problem because the way Jackrabbit stores the node information in the database is obscure. This information is stored as serialized in a BLOB field. Not easy to read nor write. I recommend restore from a previous backup. This is one of the reason to reimplement OpenKM storage in plain database tables.

Re: Repository corrupted(?) after unexpected shutdown

PostPosted:Mon Jul 01, 2013 4:48 pm
by noxious
Okay, I just hoped that there was a way to match the uuids with the repository nodes. Anyway, I restored the backup.
A final question: My reposistory is consisted of many files (4000) of very small size (just a few kBs). Should I experience better or worse performance if I stored all the repository inside my MySQL db (metadata + file body)? This would surely do the repository more fail safe.

Re: Repository corrupted(?) after unexpected shutdown

PostPosted:Thu Jul 04, 2013 9:50 am
by pavila
OpenKM 5.1 is out of support for Community Users, sorry but I recommend to upgrade to OpenKM 6.2