Details
-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
11.10.5, 12.4
-
demo package
-
Unknown
-
Description
Do the following steps on a fresh XWiki 12.4 install (Jetty+HSQLDB):
- Go to the Sandbox home page
- Edit, do a small change (e.g. make some text bold) and save
- Open the History tab
- Try to rollback to version 1.1
It failed for me with this stacktrace:
Error number 3201 in 3: Exception while saving document xwiki:Sandbox.WebHome com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document xwiki:Sandbox.WebHome at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:680) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:227) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:217) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2035) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1959) at com.xpn.xwiki.XWiki.rollback(XWiki.java:7312) at com.xpn.xwiki.XWiki.rollback(XWiki.java:7157) at com.xpn.xwiki.web.RollbackAction.action(RollbackAction.java:68) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:559) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:250) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1395) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:500) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) at java.lang.Thread.run(Thread.java:748) Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while deleting attachment. at org.xwiki.store.legacy.store.internal.FilesystemAttachmentStore.deleteXWikiAttachment(FilesystemAttachmentStore.java:240) at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:556) ... 63 more Caused by: org.xwiki.store.TransactionException: Failure in onRun() Caused by: javax.persistence.EntityExistsException A different object with the same identifier value was already associated with the session : [com.xpn.xwiki.doc.XWikiAttachment#-2096787253] at org.xwiki.store.TransactionRunnable.run(TransactionRunnable.java:333) at org.xwiki.store.StartableTransactionRunnable.start(StartableTransactionRunnable.java:54) at org.xwiki.store.legacy.store.internal.FilesystemAttachmentStore.deleteXWikiAttachment(FilesystemAttachmentStore.java:238) ... 64 more Caused by: javax.persistence.EntityExistsException: A different object with the same identifier value was already associated with the session : [com.xpn.xwiki.doc.XWikiAttachment#-2096787253] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:123) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:904) at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:826) at org.hibernate.engine.spi.SessionDelegatorBaseImpl.delete(SessionDelegatorBaseImpl.java:915) at org.xwiki.store.legacy.store.internal.FilesystemAttachmentStore$AttachmentDeleteTransactionRunnable.onRun(FilesystemAttachmentStore.java:420) at org.xwiki.store.TransactionRunnable.run(TransactionRunnable.java:318) ... 66 more
Next I opened the Attachments tab and clicked on the XWikiLogo.png. I got:
The image "..." cannot be displayed because it contains errors.
I then restarted the server and:
- went back to Sandbox home page
- open the Attachments tab -> the XWikiLogo.png attachment is broken
- open the History tab
- try to rollback to version 1.1
It failed again with the same stacktrace. So this issue is persistent across restarts and the attachment remains broken.
I then did the same steps on Sandbox.TestPage1. No problem there. So the issue seems to be related to the attachment on the Sandbox home page as the stracktrace suggests.
I then deleted my XWiki instance and created a fresh new one, where I did this steps:
- I went to the Sandbox home page
- Edit, do a small change (like make some text bold) and save
- Repeat the previous step once so that we have 2 new versions in the page history
- Open the Attachment tab and click on the XWikiLogo.png attachment to open it -> everything looked fine
- Open the History tab and rollback to version 2.1 -> Works!
- Open the Attachment tab and click on the XWikiLogo.png attachment to open it. Force clear cache to be sure -> everything was fine.
- Open the History tab again and try to rollback to version 1.1 -> Fails with the same stacktrace
- Go back to the Sandbox home page and open the Attachments tab -> the attachment is broken
So the issue sems to be limited to version 1.1 and the "Version coming from extension Sandbox Application 12.4".
Attachments
Issue Links
- blocks
-
CRAPP-219 Rendering diff does not work on first version edit of demo package pages
- Open
- is duplicated by
-
XWIKI-20738 Rollback to extension version breaks attachment in Sandbox
- Closed
- is related to
-
XWIKI-16287 Rolling back to a page version prior to an attachment version update does not restore the previous version of the attachment
- Closed