Affects Version/s: 3.2, 3.3-rc-1
Environment:Windows Server 2008 R2 x64, Oracle Enterprise 11g
XWIKI-5576 Upgrade to Hibernate 3.6.4.Final XWIKI-6685 Configure extra indexes in the hibernate mapping file for improved performance XWIKI-6521 JNDI options for hibernate in Oracle do not work XWIKI-6606 Upgrade to a recent version of hibernate XWIKI-838 XWiki cannot handle Oracle CLOB/BLOB properly via Hibernate XWIKI-2038 Use "text" instead of "string" in the hibernate mapping, where appropriate XWIKI-2047 DB2 Hibernate Mapping for 1.2 XWIKI-5389 DB2 Hibernate Mapping for 2.4 XWIKI-9019 Unable to delete attachments, rename documents and delete documents from Main wiki on Oracle 11G R2 XWIKI-2355 Hibernate queries not working with Oracle 9
It seems that starting with the Hibernate upgrade after 3.1.1 (from Hibernate 3.2.6 to 3.6.7 Final) there is a incompatibility between Hibernate and Oracle. It seems that some Oracle constraints are violated or some wrong data types are used by Hibernate to create the database in Oracle.
I tested 3.1.1 which uses Hibernate 3.2.6 and it works.
But 3.2 and 3.3 RC1 (Hibernate 3.6.7 Final) don't work
Steps to reproduce the issue:
- Install Oracle DB, create user xwiki, grant all privileges to xwiki;
- modify the hiernate.cfg.xml to point to the Oracle DB
- put the Oracle JDBC driver in libs
- Start the Wiki
- You will get a stacktrace as in "Vanilla_first_run_error.txt" attached to the issue
- rename the "xwiki.oracle.hbm.xml_MODIFIED" and "feeds.oracle.hbm.xml_MODIFIED" to "xwiki.oracle.hbm.xml" and "feeds.oracle.hbm.xml" (originally found in xwiki-platform-legacy-oldcore-3.3-rc-1) and put them in /WEB-INF/classes
- you also might want to set logging to "debug" in logback.xml
- below I have attached the original "xwiki.oracle.hbm.xml" and "feeds.oracle.hbm.xml" as along with the modified versions (that work) + also 2 diff files between the original and modified ones.
- start the xwiki and check "Modified_first_run.txt" for the stack trace. The wiki starts, I am able to import the XAR, and I also briefly tested to see if I get any breakages. Note that with the files attached, I get a lot of console messages, indicating there might be other underlying issues, or maybe some logger leftovers left enabled.
This might be similar or even identical to
I have also attached some Jetty logs in different stages until it worked. You can see there Oracle complaining about data types which it doesn't like
Also, see attached diffs and jetty logs to different stages to see different places where Oracle complained about data types.
THE DIFF FILES ARE NOT PATCHES, they only illustrate a possible (but less probable) way to make it work. They come aiding a developer to fix the issue.