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

Hibernate errors when upgrading on HSQLDB

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 9.2-rc-1
    • Fix Version/s: 9.2, 9.3-rc-1
    • Component/s: Storage
    • Labels:
    • Environment:
      HSQLDB
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Regression caused by XWIKI-14068

      To reproduce:

      • Download jetty/hsqldb 9.2-SNAPSHOT
      • Remove data/ dir and copy the data/ dir from an XWiki 8.4.4 install
      • Start xwiki and follow the DW
      • You'll see plenty of the following in the logs:
      org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.xpn.xwiki.doc.XWikiAttachment.longSize
      	at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:109)
      	at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:583)
      	at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:229)
      	at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3847)
      	at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:152)
      	at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
      	at org.hibernate.loader.Loader.doQuery(Loader.java:857)
      	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      	at org.hibernate.loader.Loader.doList(Loader.java:2542)
      	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      	at org.hibernate.loader.Loader.list(Loader.java:2271)
      	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
      	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
      	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
      	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
      	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      	at com.xpn.xwiki.store.XWikiHibernateStore.loadAttachmentList(XWikiHibernateStore.java:1644)
      	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:889)
      	at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:280)
      	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1817)
      	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1870)
      	at com.xpn.xwiki.XWiki.getXClass(XWiki.java:6077)
      	at com.xpn.xwiki.objects.classes.BaseClass.newCustomClassInstance(BaseClass.java:1072)
      	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:936)
      	at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:280)
      	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1817)
      	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1870)
      	at org.xwiki.extension.xar.internal.handler.packager.Packager.importDocumentToWiki(Packager.java:201)
      	at org.xwiki.extension.xar.internal.handler.packager.Packager.importXARToWiki(Packager.java:169)
      	at org.xwiki.extension.xar.internal.handler.packager.Packager.importXARToWiki(Packager.java:141)
      	at org.xwiki.extension.xar.internal.handler.packager.Packager.importXAR(Packager.java:131)
      	at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.installInternal(XarExtensionHandler.java:207)
      	at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.upgrade(XarExtensionHandler.java:191)
      	at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.upgrade(DefaultExtensionHandlerManager.java:139)
      	at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:325)
      	at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:209)
      	at org.xwiki.extension.job.internal.AbstractExtensionJob.applyActions(AbstractExtensionJob.java:157)
      	at org.xwiki.extension.job.internal.InstallJob.runInternal(InstallJob.java:152)
      	at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:206)
      	at org.xwiki.job.AbstractJob.run(AbstractJob.java:189)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException
      	at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:66)
      	... 42 more
      

      See https://gist.githubusercontent.com/vmassol/a64012fcf9065f97a332fd6ebac6f0ad/raw/5c44f4f5690a59c9319bcdd4663e3746fcdfb0f0/gistfile1.txt

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                vmassol Vincent Massol
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: