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.