This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-a5c4e1af-098a-4da6-92d1-0e98b7b9ea94 XWIKI-23051 Open

Abusive modification of the cached document when adding an annotation

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-77d3e474-005b-474b-81f5-d94faf86132d Manuel Leduc created this issue on 28/Mar/25 10:01
 
Summary: Abusive modification of the cached document when adding an annotation
Issue Type: cid:jira-generated-image-avatar-35aaea66-f688-4cbc-bde8-9d5b5ce00b5e Task
Affects Versions: 17.2.0-rc-1
Assignee: Unassigned
Components: Annotations
Created: 28/Mar/25 10:01
Priority: cid:jira-generated-image-static-major-4550545e-0e99-4721-970f-58bf2aa04dae Major
Reporter: Manuel Leduc
Description:
2025-03-28 09:52:08,317 [qtp1024429571-324 - http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/addAnnotationTranslation/pages/WebHome/annotations?media=json] WARN  c.x.x.d.XWikiDocument          - Abusive modification of the cached document [xwiki:addAnnotationTranslation.WebHome()] 
java.lang.IllegalStateException: Abusive modification of the cached document
    at com.xpn.xwiki.doc.XWikiDocument.setMetaDataDirty(XWikiDocument.java:2457)
    at com.xpn.xwiki.objects.BaseElement.setOwnerDocument(BaseElement.java:468)
    at com.xpn.xwiki.objects.BaseCollection.setOwnerDocument(BaseCollection.java:988)
    at com.xpn.xwiki.objects.BaseObject.setOwnerDocument(BaseObject.java:413)
    at com.xpn.xwiki.doc.XWikiDocument.createXObject(XWikiDocument.java:2970)
    at org.xwiki.annotation.io.internal.DefaultIOService.addAnnotation(DefaultIOService.java:133)
    at org.xwiki.annotation.internal.DefaultAnnotationService.addAnnotation(DefaultAnnotationService.java:98)
    at org.xwiki.annotation.rest.internal.AbstractAnnotationsRESTResource.postAnnotation(AbstractAnnotationsRESTResource.java:119)
    at org.xwiki.annotation.rest.internal.AnnotationsRESTResource.doPostAnnotation(AnnotationsRESTResource.java:78)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:569)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81) 
 
 

2 updates

 
cid:jira-generated-image-avatar-77d3e474-005b-474b-81f5-d94faf86132d Changes by Manuel Leduc on 28/Mar/25 10:01
 
Issue Type: Task Bug
Description: I obtained this error by adding an annotation to a page.
{noformat}
2025-03-28 09:52:08,317 [qtp1024429571-324 - http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/addAnnotationTranslation/pages/WebHome/annotations?media=json] WARN  c.x.x.d.XWikiDocument          - Abusive modification of the cached document [xwiki:addAnnotationTranslation.WebHome()] 
java.lang.IllegalStateException: Abusive modification of the cached document
    at com.xpn.xwiki.doc.XWikiDocument.setMetaDataDirty(XWikiDocument.java:2457)
    at com.xpn.xwiki.objects.BaseElement.setOwnerDocument(BaseElement.java:468)
    at com.xpn.xwiki.objects.BaseCollection.setOwnerDocument(BaseCollection.java:988)
    at com.xpn.xwiki.objects.BaseObject.setOwnerDocument(BaseObject.java:413)
    at com.xpn.xwiki.doc.XWikiDocument.createXObject(XWikiDocument.java:2970)
    at org.xwiki.annotation.io.internal.DefaultIOService.addAnnotation(DefaultIOService.java:133)
    at org.xwiki.annotation.internal.DefaultAnnotationService.addAnnotation(DefaultAnnotationService.java:98)
    at org.xwiki.annotation.rest.internal.AbstractAnnotationsRESTResource.postAnnotation(AbstractAnnotationsRESTResource.java:119)
    at org.xwiki.annotation.rest.internal.AnnotationsRESTResource.doPostAnnotation(AnnotationsRESTResource.java:78)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:569)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81) {noformat}