Details
-
Bug
-
Resolution: Fixed
-
Minor
-
7.0-milestone-1
-
None
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
When editing a property of a class and changing its storage type (e.g. db list property changed from multiselect to non-multiselect), if an object of that class is present in the document of the class, the class editor's save operation fails with the following exception:
2015-02-18 13:46:15,212 [http://localhost:8080/xwiki/bin/preview/Main/TestClass] ERROR o.h.j.AbstractBatcher - Exception executing batch: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [1]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:90) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2541) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2494) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2821) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1237) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:187) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:713) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:701) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:697) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:664) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:177) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:170) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1402) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.web.PropUpdateAction.propUpdate(PropUpdateAction.java:82) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.web.SaveAndContinueAction.doWrappedAction(SaveAndContinueAction.java:86) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java:199) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:344) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:146) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) [struts-core-1.3.10.jar:1.3.10] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) [struts-core-1.3.10.jar:1.3.10] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [struts-core-1.3.10.jar:1.3.10] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) [struts-core-1.3.10.jar:1.3.10] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:115) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:127) [xwiki-platform-wysiwyg-server-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) [xwiki-platform-container-servlet-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) [xwiki-platform-container-servlet-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595) [jetty-security-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:191) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:72) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:105) [xwiki-platform-legacy-oldcore-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:127) [xwiki-platform-wysiwyg-server-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63) [xwiki-platform-container-servlet-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) [xwiki-platform-webdav-server-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) [xwiki-platform-container-servlet-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) [xwiki-platform-container-servlet-7.0-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [jetty-security-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.Server.handle(Server.java:497) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248) [jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610) [jetty-util-9.2.3.v20140905.jar:9.2.3.v20140905] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539) [jetty-util-9.2.3.v20140905.jar:9.2.3.v20140905] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
At a first glance, it looks like this case is specially handled in the storage, however it is not handled for all property types (not for lists nor numbers).
Attachments
Issue Links
- is related to
-
XWIKI-11800 Cannot change a list property from multiple select to single select if there is an instance that has no value selected
- Closed