jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Fry" <Peter....@heywood.co.uk>
Subject RE: node.getNodes() different results to NodeState.getChildNodeEntry
Date Thu, 10 May 2012 13:18:24 GMT
It may have been fixed by specifying the following in the PersistenceManager configuration
for the workspace:

			<param name="consistencyCheck" value="true"/>
			<param name="consistencyFix" value="true"/>	

OR

Commenting back in the <SearchIndex> config entry for the workspace (commented out because
of some issues in 2.4.0 that have been fixed in 2.4.1)
this also had

			<param name="forceConsistencyCheck" value="true" />
			<param name="autoRepair" value="true" />

So a number of changes happened concurrently that resolved the issue but my feeling is that
it is the changes to the PersistenceManager probably fixed it.

Thanks for the suggestions! 

Peter.


-----Original Message-----
From: Nicolas Peltier [mailto:npeltier@adobe.com] 
Sent: 10 May 2012 13:15
To: users@jackrabbit.apache.org
Cc: Peter Fry
Subject: Re: node.getNodes() different results to NodeState.getChildNodeEntry

isn't NodeState related to a transient step? The difference you see would mean the transient
# of children is different from the persisted one (which wouldn't be choking)?

Le 10 mai 2012 à 14:07, Julian Reschke a écrit :

> On 2012-05-10 13:39, Peter Fry wrote:
>> I am trying to debug why a node can't be added to a parent. I'm 
>> getting a ItemExistsException at line 1281 of NodeImpl  i.e. in
>> 
>> 
>> 
>>         NodeState thisState = data.getNodeState();
>> 
>>         ChildNodeEntry cne = thisState.getChildNodeEntry(nodeName, 
>> 1);
>> 
>>         if (cne != null) {
>> 
>>             // there's already a child node entry with that name;
>> 
>>             // check same-name sibling setting of new node
>> 
>>             if (!def.allowsSameNameSiblings()) {
>> 
>>                 throw new ItemExistsException(
>> 
>>                         "This node already exists: "
>> 
>>                         + itemMgr.safeGetJCRPath(nodePath));
>> 
>>             }
>> 
>>             // check same-name sibling setting of existing node
>> 
>>             NodeImpl existing = itemMgr.getNode(cne.getId(), 
>> getNodeId());
>> 
>>             if (!existing.getDefinition().allowsSameNameSiblings()) {
>> 
>>                 throw new ItemExistsException(
>> 
>>                         "Same-name siblings not allowed for " + 
>> existing);
>> 
>>             }
>> 
>>         }
>> 
>> 
>> 
>> But when I query the respository with JCR 2 using:
>> 
>> 
>> 
>> NodeIterator nodes = node.getNodes();
>> 
>> while (nodes.hasNext()) {
>> 
>>        Node node1 = nodes.nextNode();
>> 
>> }
>> 
>> 
>> 
>> I don't get the node listed that is causing the collision. How come 
>> some nodes show up in the addNode code
>> 
>> That don't show up in the node.getNodes() call?
>> ...
> 
> Wild guess: permissions?

Best Pensions Administration Software at the FT Pensions and Investment Provider Awards

This email and any files transmitted with it are confidential and intended solely for the
use of the individual or entity to which they are addressed. If you have received this communication
in error, please inform the sender by email immediately then delete the original e-mail and
any attachments from your system. 
Heywood Limited. Registered in England No. 4161207. Registered Office: Aquila House 35 London
Road Redhill Surrey RH1 1NJ

Please think about your environment before printing
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message