You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2013/09/10 13:10:42 UTC

Exception thrown in Item.save

Hi,

After refreshing the build which has changes done in OAK-993 I am
getting following exception. (Detailed one at [1])

--
Caused by: javax.jcr.UnsupportedRepositoryOperationException:
OakUnsupported0000: Failed to save subtree at
/content/usergenerated/content/geometrixx-outdoors/en/socialforum-vpktx/jcr:content/forum/1_ciot/wufg-init_topic_vpktx1.
There are transient modifications outside that subtree.
---

Now from OAK-993 I understand that such saves would cause issue. Can
some background be provided in

1. What might be the issue cause
2. Is this a change in behavior from JR2
3. If as a user I see such issue then what should I change ... or what
I am doing which is causing this issue

[1] https://paste.apache.org/mAL7

Chetan Mehrotra

Re: Exception thrown in Item.save

Posted by Michael Dürig <md...@apache.org>.

On 10.9.13 1:10 , Chetan Mehrotra wrote:
> Hi,
>
> After refreshing the build which has changes done in OAK-993 I am
> getting following exception. (Detailed one at [1])
>
> --
> Caused by: javax.jcr.UnsupportedRepositoryOperationException:
> OakUnsupported0000: Failed to save subtree at
> /content/usergenerated/content/geometrixx-outdoors/en/socialforum-vpktx/jcr:content/forum/1_ciot/wufg-init_topic_vpktx1.
> There are transient modifications outside that subtree.
> ---
>
> Now from OAK-993 I understand that such saves would cause issue. Can
> some background be provided in
>
> 1. What might be the issue cause
> 2. Is this a change in behavior from JR2
> 3. If as a user I see such issue then what should I change ... or what
> I am doing which is causing this issue
>
> [1] https://paste.apache.org/mAL7

Item.save() is deprecated and Oak doesn't fully support it. Up to 
OAK-993 calling Item.save() would log a warning and then fall back to 
Session.save(). As this might cause strange, undesired and difficult to 
diagnose side effects, OAK-993 changed this such that Item.save() now 
implements the contract by saving the item if the result is the same as 
calling Session.save() and throwing an 
UsupportedRepositoryOperationException otherwise.

For the time being and until issues with upstream applications are 
sorted out, you could use -Ditem-safe-does-session-safe=true to get the 
old behaviour.

Michael

>
> Chetan Mehrotra
>