Details
-
Bug
-
Resolution: Fixed
-
Minor
-
1.0 RC3
-
None
-
standalone,jetty,jdk1.6,linux
-
rename,ui
-
Description
1. Goto nonexistent document. For example: http://localhost:8080/xwiki/bin/view/Main/qwe
2. rename to anything. for example Main.qwe1
Got:
Error number 4001 in 4: Error while parsing velocity page Wrapped Exception: Invocation of method 'rename' in class com.xpn.xwiki.api.Document threw exception com.xpn.xwiki.XWikiException: Error number 3203 in 3: Exception while deleting document Main.qwe Wrapped Exception: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 @ [38,6]
in logs:
04:33:29,274 ERROR P1-19 http://localhost:8080/xwiki/bin/view/Main/qwe?xpage=rename&step=2 AbstractBatcher:doExecuteBatch:61 - Exception executing batch:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:145)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:356)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:573)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:547)
at com.xpn.xwiki.store.XWikiHibernateStore.deleteXWikiDoc(XWikiHibernateStore.java:530)
at com.xpn.xwiki.store.XWikiCacheStore.deleteXWikiDoc(XWikiCacheStore.java:185)
at com.xpn.xwiki.XWiki.deleteDocument(XWiki.java:3050)
at com.xpn.xwiki.doc.XWikiDocument.rename(XWikiDocument.java:3268)
at com.xpn.xwiki.api.Document.rename(Document.java:1696)
Also reprocuducable in xwiki.org
Maybe rename button should be hidden when document is not exist.