jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-2961) Improve logging of Session.save() to trace back root cause of externally modified nodes
Date Fri, 06 May 2011 05:24:03 GMT

    [ https://issues.apache.org/jira/browse/JCR-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029756#comment-13029756
] 

Thomas Mueller commented on JCR-2961:
-------------------------------------

The path is already included in the exception message in some cases:

Exception in thread "main" javax.jcr.InvalidItemStateException: property /test/x/y: the property
cannot be saved because it has been modified externally.
	at org.apache.jackrabbit.core.PropertyImpl.makePersistent(PropertyImpl.java:155)
	at org.apache.jackrabbit.core.ItemSaveOperation.persistTransientItems(ItemSaveOperation.java:835)
	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:243)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
	at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:57)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
	at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:360)
	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:800)

But not in all cases. This message looks like a bug:

Exception in thread "main" javax.jcr.InvalidItemStateException: Item cannot be saved because
it has been deleted externally: item.save()
	at org.apache.jackrabbit.core.ItemSaveOperation.getTransientStates(ItemSaveOperation.java:322)
	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:98)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
	at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:64)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
	at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:360)
	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:800)

> Improve logging of Session.save() to trace back root cause of externally modified nodes
> ---------------------------------------------------------------------------------------
>
>                 Key: JCR-2961
>                 URL: https://issues.apache.org/jira/browse/JCR-2961
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently it's very difficult to find the root cause of error like: javax.jcr.InvalidItemStateException:
<UUID> has been modified externally.
> To better trace back such issues, it would be nice to add DEBUG logging for the Session.save()
call.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message