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

Classcastexception when requesting database object from an upgraded extension

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 12.10.8
    • Old Core
    • None
    • Unknown

    Description

      Hibernate is initialized at startup and extension having database mapping are also injecting their mapping at startup. The problem is that if you upgrade the extension then the classes Hibernate knows are the one from the previous classloader.

      Ideally, we would need to recreate the Hibernate classloader as soon as the classloader of any of the currently registered hibernate entities is closed. There does not seems to be any way to know that in standard ClassLoader but we could add a #isClosed() in NamespaceURLClassLoader.

      The workaround is to restart XWiki.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: