Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-299

Changing property layout of a list property in a class doesn' work (multiple select yes/no)

    XMLWordPrintable

Details

    • multiple select, property, class

    Description

      When you add a list property, whatever it's a static list or database list, you can't modify the layout it's displayed.

      How to reproduce :
      1) create a class, add a property list (static list or database list, bug on both but static is more simple for trying)
      2) select No on multiple select
      3) save your class
      4) create a new doc from this class
      5) go back to class editor and change property layout form No to Yes
      6) save your class

      Wiki crashes.
      This has been tested on both static and db list and both reversing form No to Yes and Yes to No on Multiple select.

      Exception Error should look like this (has you can guess, my static list was "choice 1|choice 2|choice 3|choice 4|choice 5" :
      Error number 3201 in 3: Exception while saving document Main.TestAlexDocA
      Wrapped Exception: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.StringListProperty#

      choice 2
      choice 3
      choice 4
      choice 5

      ]
      com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document Main.TestAlexDocA
      Wrapped Exception: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.StringListProperty#

      choice 2
      choice 3
      choice 4
      choice 5

      ]
      at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:300)
      at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94)
      at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:88)
      at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:673)
      at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:79)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:138)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)

      Wrapped Exception:

      org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.StringListProperty#

      choice 2
      choice 3
      choice 4
      choice 5

      ]
      at org.hibernate.persister.entity.BasicEntityPersister.check(BasicEntityPersister.java:1431)
      at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:1976)
      at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.java:1899)
      at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2139)
      at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:75)
      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:726)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:320)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:556)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:534)
      at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:295)
      at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94)
      at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:88)
      at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:673)
      at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:79)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:138)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)

      Attachments

        Issue Links

          Activity

            People

              amelentev Artem Melentev
              alexaf Alex
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: