InstallationOracle

Version 1.10 by Vincent Massol on 2008/04/10
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Oracle Installation

Invalid macro parameters used for the [toc] macro. Cause: [Failed to validate bean: [must be greater than or equal to 1]]. Click on this message for details.

Installation steps

Oracle support is available in XWiki 1.0 RC1 and above only and has been tested only with Oracle Express 10g 10.0.2.3

Steps:

"connect system;" (type the password)
  • Create the wiki database: 
"create user xwiki identified by xwiki;"
  • Give all privileges to the xwiki user:
"grant all privileges to xwiki;"
  • Tell XWiki to use Oracle Express. To do this, edit the WEB-INF/hibernate.cfg.xml file where you have expanded the XWiki WAR file. Replace the matching properties with the following ones (or uncomment them if they are present):
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>

<!-- Tell Oracle to allow CLOBs larger than 32K -->
<property name="hibernate.connection.SetBigStringTryClob">true</property>
<property name="hibernate.jdbc.batch_size">0</property>

<mapping resource="xwiki.oracle.hbm.xml"/>
<mapping resource="feeds.oracle.hbm.xml"/>

Note 1: 'XE' is the default name of the ORACLE SID created by default by the installation. If it is another you should change it. You can find the correct SID in app/oracle/product/10.2.0/server/NETWORK/ADMIN/tnsnames.ora in the Oracle installation directory (for Windows).

Note 2: The xwiki.oracle.hbm.xml and feeds.oracle.hbm.xml files are modified hibernate models working with Oracle. We are not using them as default models for other Database because they might create some columns with incorrect types for these databases. Do not use them with other databases.

Troubleshooting

First, make sure you're using the xwiki.oracle.hbm.xml and feeds.oracle.hbm.xml files (see above).

SetString can only process strings of less than 32766 chararacters

If you see an error that says something like:

Error number 3201 in 3: Exception while saving document XWiki.XWikiPreferences
Wrapped Exception: could not update: [com.xpn.xwiki.doc.XWikiDocumentArchive#104408758]
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document XWiki.XWikiPreferences
Wrapped Exception: could not update: [com.xpn.xwiki.doc.XWikiDocumentArchive#104408758]
...
Wrapped Exception:

java.sql.SQLException: setString can only process strings of less than 32766 chararacters
...

Then that's because Oracle has a limitation of 32K for CLOBs. To overcome it you need to add the following 2 properties in the hibernate.cfg.xml file, as specified in the installation steps section above:

<property name="hibernate.connection.SetBigStringTryClob">true</property>
<property name="hibernate.jdbc.batch_size">0</property>

Get Connected