Blog posts for February 2011

Hibernate HQLDB Tutorial

Here is a Hibernate tutorial that uses HQLDB.

Java Language

A succinct Java language tutorial.

Be patient as the link may be slow to download.

An online version is here:

Oracle Linux install tricks

Notes from installing the recent release.  I remember most of these issues with as well.


increase shmem in Linux kernel

edit /etc/sysctl.conf and add these settings

# Oracle 10.2/11.2 settings
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

install libaio and ksh93

# emerge -av libaio ksh

temp symlink for

Be sure to rm after the oracle installer completes.

# cd /usr/lib
# ll libstdc*
lrwxrwxrwx 1 root root      18 2011-01-08 10:28 ->*
-rwxr-xr-x 1 root root 1088425 2009-09-28 16:03*
# ln -s
[run installer here]
# rm

During Installation

add -rt to sysliblist

After the prerequisites dialog, when the installer has been running for awhile on the AMD64 Gentoo Linux, a link or compile step will fail.  Examining the log file reveals a missing NPTL symbol: pthread_unwind.  This function appears in and
At the point of failure, edit $ORACLE_HOME/lib/sysliblist and append -lrt.  Click Retry on the Oracle installer and this problem is behind you.

Draft XWiki docs

More XWiki document contributions, not yet published to main XWiki site.

Hibernate using Oracle

Still using Jetty for the J2EE container, but now we are running Hibernate against Oracle instead of Hibernate's HQLDB.

At first,I could not get the hibernate.cfg.xml to work with a schema name/password other than the default (xwiki).  The config file is read, but the username and password properties are not honored for DDL statements (like those run on first XWiki startup when the XWiki database schema is empty).

If I used xwiki for the Oracle schema username, Hibernate persistence works as expected.  If I used another schema name, i.e. wiki27, stdout and the client web browser show Java Exceptions like: 

java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges

Examination of xwiki.log revealed the root cause:

2011-02-21 10:19:33,419 [http://localhost:8080/xwiki/bin/import/XWiki/XWikiPreferences] ERROR store.XWikiHibernateBaseStore   - Failed updating schema while executing query [create table xwiki.activitystream_events (ase_eventid varchar2(255 char) not null, ase_requestid varchar2(2000 char), ase_stream varchar2(255 char), ase_date timestamp, ase_priority number(10,0), ase_type varchar2(255 char), ase_application varchar2(255 char), ase_user varchar2(255 char), ase_wiki varchar2(255 char), ase_space varchar2(255 char), ase_page varchar2(255 char), ase_url varchar2(2000 char), ase_title varchar2(2000 char), ase_body varchar2(2000 char), ase_version varchar2(30 char), ase_param1 varchar2(2000 char), ase_param2 varchar2(2000 char), ase_param3 varchar2(2000 char), ase_param4 varchar2(2000 char), ase_param5 varchar2(2000 char), primary key (ase_eventid))]
java.sql.SQLSyntaxErrorException: ORA-01918: user 'XWIKI' does not exist

It turns out some XWiki persistence component, possibly related to the virtual wiki support, specifies fully-qualified schema.table names in DDL statements and is hardcoded to xwiki for the schema name.  The username property in the Oracle section of hibernate.cfg is honored for logging in to the database, but not for subsequent DDL.  So the XWiki database session is trying to create a table in another user's schema.


The workaround is to force the schema name in the xwiki.cfg file.  E.g. to use a oracle schema name of xwiki27:

#-# [Since 1.6M1]

#-# Force the database name for the main wiki in virtual mode and for the wiki itself in non virtual mode.

# xwiki.db=xwiki


Python & Grails tutorials

Python tutorial

Grails tutorial.  Not sure if Grails can run in XWiki.

XWiki WebLogic Deploy

This shows how to get XWiki deployed on the WebLogic 9.x application server.

Working on Solaris 10 AMD64 now, using the newly-released 2.7.1 XWiki war as a base, I edited WEB-INF/xwiki.cfg with the usual schema name trick, superadmin password and WEB-INF/hibernate.cfg.xml with the Oracle JDBC driver properties.

I then added some XML to the config.xml for an existing 5.2  WebLogic Server 9.2 MP2.


I edited the obj.conf to pass through /xwiki/ to the existing weblogic instance.

Looks like some old/new versions of class libraries may be an issue.  I get different sets of Exceptions depending on whether I set the <prefer-web-inf-classes>true</prefer-web-inf-classes> property in weblogic.xml.

I should write more notes about deploying XWiki or Grails war files to WebLogic 9.2.  It worked fairly well.  After my initial deployment I found these notes about WebLogic and Grails deployment.  It may be applicable here?

Created by Administrator on 07/09/2013
This website content is not licensed to you. All rights reserved.
XWiki Enterprise 9.11.1 - Documentation