jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Przemyslaw Pakulski <ppakul...@o2.pl>
Subject Restoring node with referenced child problem
Date Thu, 12 Jan 2006 10:00:28 GMT
Hi,

I found a unexpected exception during restoring node, which has child 
referenced. I tested following scenario :

1. Create root node,
2. Add 1st child node (CHILD_0) below root node,
3. Add 2nd child node (CHILD_1) below root node,
4. Create reference property on 2nd node (CHILD_1) to 1st node (CHILD_0),
5. Create new version of root node (checkout -> set some property -> 
checkin),
6. Try to restore root node to previous version.

When I try to restore root node exception occurs:
javax.jcr.ItemNotFoundException: 
f201e30f-42f2-46b6-bdab-8aa472777c92/{http://www.jcp.org/jcr/1.0}primaryType

> 10:53:22,031 INFO  com.oyster.mom.contentserver.prototyping.it5.TestRestoreNodeWithChildReferenced.main(TestRestoreNodeWithChildReferenced.java:63)
- Initial version : 1.0
> 10:53:22,140 INFO  com.oyster.mom.contentserver.prototyping.it5.TestRestoreNodeWithChildReferenced.main(TestRestoreNodeWithChildReferenced.java:70)
- Next version : 1.1
> javax.jcr.ItemNotFoundException: 59842503-3277-421f-896c-86c508ad8e76/{http://www.jcp.org/jcr/1.0}isCheckedOut
> 	at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:467)
> 	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:319)
> 	at org.apache.jackrabbit.core.ItemImpl.restoreTransientItems(ItemImpl.java:691)
> 	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1192)
> 	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:758)
> 	at org.apache.jackrabbit.core.NodeImpl.internalRestore(NodeImpl.java:3502)
> 	at org.apache.jackrabbit.core.NodeImpl.restore(NodeImpl.java:2848)
> 	at com.oyster.mom.contentserver.prototyping.it5.TestRestoreNodeWithChildReferenced.main(TestRestoreNodeWithChildReferenced.java:74)
> 10:53:22,281 INFO  com.oyster.mom.contentserver.prototyping.it5.TestRestoreNodeWithChildReferenced.main(TestRestoreNodeWithChildReferenced.java:84)
- Done.

Find attached source test.

Regards
Przemo Pakulski
www.cognifide.com


Mime
View raw message