IsthereasimplewaygettingxwikiworkingwithOracle
Question | Is there a way to get Xwiki 1.0.x working with an oracle database? |
Answer |
It doesn't seem to be as easy, as one might expect - due to the hibernate persistence layer. I haven't a working solution now, below you'll find the steps to get at least a connection and a db-schema :-/ The main changes are related to the hibernate relation mapping. The xwiki mapping contains "string" types with a size of > 4k. hibernate stores these as "long" (oracle long), this is not appropriate. I've changed "string" to "text" (where size > 4k) (See attached files) modify the hibernate configuration path in xwiki.cfg: xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.oracle.xml modify the hibernate.cfg.oracle.xml file (attached) to enter the right connection data. create a directory .../xwiki/WEB-INF/classes put the attached file xwiki-oracle.hbm.xml there. Put the odbc-drivers (ojdbc14.jar) into ../xwiki/WEB-INF/lib If you start xwiki now, you should get a connection, the db-schema should get created. I'm getting the following error while accessing xwiki: ERROR P1-19 org.hibernate.util.JDBCExceptionReporter - ORA-01400: Einfügen von NULL in ("WIKI"."XWIKIDOC"."XWD_TITLE") nicht möglich I've tried to change all the not-null columns to null (as it is easier than to change the contraint to deferrable & deferred), but it does not help. At this point, some debugging seems to be necessary... An article of interest might be https://jira.xwiki.org/browse/XWIKI-838 |