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

XWiki cannot handle Oracle CLOB/BLOB properly via Hibernate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0 RC1
    • 1.0 B2, 1.0 B3
    • Storage
    • None
    • Oracle 10
    • patch Hibernate Oracle CLOB BLOB LONG

    Description

      I am trying to get XWiki work with Oracle 10g.

      From 1.0Bx, XWiki can create all tables if the database is empty. But the DDL the hibernate generated try to create LONG column to string w/ the length between 4000 ~ 32K, which ended up failure because Oracle does not allow more than 1 LONG column within a single table.

      So I have to modified the Hiberante Mapping xml by adding "sql-type=clob" and "sql-type=blob" for all the big string and binary properties used by XWiki. Then XWiki successfully created 31 tables (including the XWikiUsers)
      Here is the modified Hibernate Mapping *.hbm.xml: http://docs.google.com/View?docid=ddqbx4zp_13g68r28
      I reverse engineered the Oracle DDL for the data schema: http://docs.google.com/View?docid=ddqbx4zp_12s75qxw

      But then XWiki started to fail because it tried to insert NULL to the XWikiDocs and XWikiPreferences table.

      Can someone improve the persistence part of XWiki and make it more compatable with Oracle?

      Thanks.

      Attachments

        1. hbm.xml.zip
          4 kB
        2. hibernate.cfg.xml
          3 kB
        3. patch-src.jar
          3 kB
        4. patch-838.patch
          16 kB
        5. patch-files-838.zip
          37 kB

        Activity

          People

            ldubost@free.fr Ludovic Dubost
            goldenorbit Eric Sun
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: