jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafał Kwiecień <ra...@consol.pl>
Subject cluster feature - bug ?
Date Mon, 19 Feb 2007 11:08:29 GMT
Hi

I try to use cluster feature. I run two very simple applications. The first 
application create nodes. The second application delete nodes. If I run them 
separately, works fine. But if I run them simultaneously, sometimes  I get 
exceptions like this:

Remove.java:

19-lut-2007 11:05:58 ERROR [lusterNode] Unexpected error while preparing log 
entry.
java.lang.NullPointerException
        at 
org.apache.jackrabbit.core.cluster.FileRevision.unlock(FileRevision.java:117)
        at 
org.apache.jackrabbit.core.cluster.FileJournal.prepare(FileJournal.java:649)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode.updatePrepared(ClusterNode.java:401)
        at org.apache.jackrabbit.core.cluster.ClusterNode.access$000
(ClusterNode.java:40)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode$WorkspaceUpdateChannel.updatePrepared(ClusterNode.java:559)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:647)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:778)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:808)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
        at 
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:302)
        at 
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:295)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1204)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:821)
        at Remove.remove(Remove.java:36)
        at Remove.main(Remove.java:12)
19-lut-2007 11:05:58 ERROR [lusterNode] Unexpected error while committing log 
entry.
java.lang.NullPointerException
        at 
org.apache.jackrabbit.core.cluster.FileJournal.commit(FileJournal.java:660)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode.updateCommitted(ClusterNode.java:425)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode$WorkspaceUpdateChannel.updateCommitted(ClusterNode.java:566)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:712)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:808)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
        at 
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:302)
        at 
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:295)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1204)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:821)
        at Remove.remove(Remove.java:36)
        at Remove.main(Remove.java:12)
19-lut-2007 11:05:59 ERROR [Dispatcher] Synchronous EventConsumer threw 
exception.
java.lang.NullPointerException
        at 
org.apache.jackrabbit.core.query.lucene.NodeIndexer.createDoc(NodeIndexer.java:141)
        at 
org.apache.jackrabbit.core.query.lucene.NodeIndexer.createDocument(NodeIndexer.java:115)
        at 
org.apache.jackrabbit.core.query.lucene.SearchIndex.createDocument(SearchIndex.java:475)
        at 
org.apache.jackrabbit.core.query.lucene.SearchIndex$2.next(SearchIndex.java:318)
        at 
org.apache.jackrabbit.core.query.lucene.MultiIndex.update(MultiIndex.java:321)
        at 
org.apache.jackrabbit.core.query.lucene.SearchIndex.updateNodes(SearchIndex.java:306)
        at 
org.apache.jackrabbit.core.SearchManager.onEvent(SearchManager.java:451)
        at 
org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventConsumer.java:231)
        at 
org.apache.jackrabbit.core.observation.ObservationDispatcher.dispatchEvents(ObservationDispatcher.java:201)
        at 
org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventStateCollection.java:430)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.externalUpdate(SharedItemStateManager.java:835)
        at 
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.externalUpdate(RepositoryImpl.java:1952)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode$SyncListener.end(ClusterNode.java:800)
        at 
org.apache.jackrabbit.core.cluster.FileJournal.process(FileJournal.java:398)
        at 
org.apache.jackrabbit.core.cluster.FileJournal.sync(FileJournal.java:305)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode.sync(ClusterNode.java:217)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode.run(ClusterNode.java:189)
        at java.lang.Thread.run(Thread.java:595)
19-lut-2007 11:06:04 ERROR [lusterNode] Unexpected error while preparing log 
entry.
java.lang.NullPointerException
        at 
org.apache.jackrabbit.core.cluster.FileRevision.unlock(FileRevision.java:117)
        at 
org.apache.jackrabbit.core.cluster.FileJournal.prepare(FileJournal.java:649)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode.updatePrepared(ClusterNode.java:401)
        at org.apache.jackrabbit.core.cluster.ClusterNode.access$000
(ClusterNode.java:40)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode$WorkspaceUpdateChannel.updatePrepared(ClusterNode.java:559)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:647)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:778)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:808)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
        at 
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:302)
        at 
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:295)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1204)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:821)
        at Remove.remove(Remove.java:36)
        at Remove.main(Remove.java:12)
19-lut-2007 11:06:04 ERROR [lusterNode] Unexpected error while committing log 
entry.
java.lang.NullPointerException
        at 
org.apache.jackrabbit.core.cluster.FileJournal.commit(FileJournal.java:660)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode.updateCommitted(ClusterNode.java:425)
        at 
org.apache.jackrabbit.core.cluster.ClusterNode$WorkspaceUpdateChannel.updateCommitted(ClusterNode.java:566)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:712)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:808)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
        at 
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:302)
        at 
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:295)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1204)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:821)
        at Remove.remove(Remove.java:36)
        at Remove.main(Remove.java:12)
javax.jcr.InvalidItemStateException: /: the item cannot be saved because it 
has been modified externally.
        at 
org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:342)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1069)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:821)
        at Remove.remove(Remove.java:36)
        at Remove.main(Remove.java:12)

Create.java:

javax.jcr.ItemNotFoundException: 9596c874-4804-4e65-9884-17e32a5d6b1d
        at 
org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:467)
        at 
org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:323)
        at 
org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:796)
        at 
org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:740)
        at 
org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:687)
        at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1912)
        at Create.create(Create.java:30)
        at Create.main(Create.java:12)

and repository doesn't work anymore. If I try to run it, I get exception when 
nodes are created:

Create.java:

javax.jcr.ItemNotFoundException: 9596c874-4804-4e65-9884-17e32a5d6b1d
        at 
org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:467)
        at 
org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:323)
        at 
org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:796)
        at 
org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:740)
        at 
org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:687)
        at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1912)
        at Create.create(Create.java:30)
        at Create.main(Create.java:12)

The exception is thrown always for the same node(e.g. 33 nodes are created 
fine but when 34. is created exception is thrown)

If I remove the index directory, I get exception when repository is 
initialized:

19-lut-2007 11:39:12 ERROR [sitoryImpl] Failed to initialize workspace 
'default'
javax.jcr.RepositoryException: Error indexing root node: 
9596c874-4804-4e65-9884-17e32a5d6b1d: Error indexing root node: 
9596c874-4804-4e65-9884-17e32a5d6b1d: Error indexing root node: 
9596c874-4804-4e65-9884-17e32a5d6b1d
        at 
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:506)
        at 
org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:248)
        at 
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1638)
        at 
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:622)
        at 
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:375)
        at 
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:293)
        at 
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:573)
        at 
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
        at 
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
        at 
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
        at 
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
        at Create.getSession(Create.java:17)
        at Create.create(Create.java:25)
        at Create.main(Create.java:12)
Caused by: java.io.IOException: Error indexing root node: 
9596c874-4804-4e65-9884-17e32a5d6b1d
        at 
org.apache.jackrabbit.core.query.lucene.MultiIndex.<init>(MultiIndex.java:284)
        at 
org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:245)
        at 
org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:44)
        at 
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:504)
        ... 13 more
java.io.IOException: Error indexing root node: 
9596c874-4804-4e65-9884-17e32a5d6b1d
        at 
org.apache.jackrabbit.core.query.lucene.MultiIndex.<init>(MultiIndex.java:284)
        at 
org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:245)
        at 
org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:44)
        at 
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:504)
        at 
org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:248)
        at 
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1638)
        at 
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:622)
        at 
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:375)
        at 
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:293)
        at 
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:573)
        at 
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
        at 
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
        at 
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
        at 
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
        at Create.getSession(Create.java:17)
        at Create.create(Create.java:25)
        at Create.main(Create.java:12)
19-lut-2007 11:39:12 ERROR [sitoryImpl] Unable to start repository, forcing 
shutdown...

Is it a bug or maybe I do something wrong ?

-- 
Rafał Kwiecień
ConSol* Consulting & Solutions Software Poland Sp. z o.o.
ul. Piastowska 44C, 30-070 Kraków 
http://www.consol.pl/

Mime
View raw message