Hi all,
maybe it’s a noob question for most of you…
But all I’m trying to do is to install XWiki on an existing Debian (still Wheezy, sorry) server and to point it to an existing Oracle database.
First steps I tried:
Using a DEB archive I successfully installed Tomcat7 and “xwiki-tomcat7-common”, but at the point to edit “hibernate.cfg.xml” to point to my Oracle DB, I noticed there is no hibernate.cfg.xml at all!
So I tried to switch back and go the long way on my own: manual installation if the WAR archive.
May anyone point me to the actual installation step on the WAR Installation Guide?
According that guide I first have to download the WAR and check the requirements - and… nothing more?
Can please anyone explain what to do with a WAR and maybe help me find the missing hibernate.cfg.xml?
Do I need to install any MySQL or Postgres first? Can I create the file from scratch, as there already is a symbolic link “/usr/lib/xwiki/WEB-INF/hibernate.cfg.xml → /etc/xwiki/hibernate.cfg.xml”?
The Method of installing the WAR is explained in the Tomcat installation guide in detail. But to clarify, you simply EXTRACT the WAR file and paste the extracted folder into the ones listed in the installation guide.
Then create a user and database using the following command; CREATE DATABASE xwiki CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON xwiki.* TO ‘xwiki’@‘localhost’ IDENTIFIED BY ‘xwiki’;
From there, set a password on your Xwiki user.
Am sure I have missed some details but those 2 links should be able to cover most of the questions that may arise. If you have any more questions when you get to this stage, please ask.
Thanks Syn!
I somehow missed the fact, that WAR is a simple archive which I might extract everywhere. So I only took the missing hibernate.cfg.xml from there, corrected it to use my Oracle Instant client and it worked.
For some reason I had to place the ojdbc6.jar into /usr/share/tomcat7/lib/ rather than /usr/lib/xwiki/WEB-INF/lib/ which gave me the well known “NullPointerException at HqlSqlWalker”…
For everyone that faces the same problem, here are my steps to get it running with Oracle instant client:
issue ‘sudo apt-get install xwiki-tomcat7-common’ (or choose tomcat8 if available for your distribution)
you may run into the problem, that Tomcat 7 does not find the Java 8 home, so explicitly set JAVA_HOME=/usr/lib/jvm/java-8-oracle in the config file /etc/default/tomcat7
increase Tomcat memory in this same file as described in the “Tomcat Usability Section”
create the file /usr/share/tomcat7/bin/setenv.sh and set it executable with the following content:
if the installation aborted on the first attempt, be sure to complete if with ‘sudo apt-get install -f’
finally extract the missing hibernate.cfg.xml from the currect WAR archive to /etc/xwiki/ and configure the Oracle section. I used the simple SID to name the database source rather than the global full name: