JBoss Installation
Version 14.1 by Vincent Massol on 2011/05/03
These instructions are for JBoss Application Server 4.0.X.
- Download and install JBoss Application Server . It's usually as simple as unzipping it in a directory. Let's call this directory $JBOSS_HOME.
- (optional) By default JBoss runs on port 8080. If you want to modify the port on which JBoss is running, edit $JBOSS_HOME/server/<mode>/deploy/jbossweb-tomcat55.sar/server.xml. Search for 8080 and replace with the port value you wish to use. Similarly change the port in $JBOSS_HOME/server/<mode>/deploy/http-invoker.sar/META-INF/jboss-service.xml to the value you like.
- Copy and expand the XWiki WAR into a directory named xwiki.war/ (note that unlike most servlet containers JBoss wants the directory name to end with .war) in $JBOSS_HOME/server/<server configuration>/deploy where server configuration is the JBoss configuration you're using.
Classloading Isolation
It seems that by default JBoss AS doesn't isolate JARs located in WEB-INF/lib from the JARs provided by the appserver itself, thus leading to version clashing between JARs provided by XWiki and JARs provided by JBoss.
To solve this, please read up on JBoss ClassLoading Configuration.
Log4j Error
- Edit $JBOSS_HOME/server/<server configuration>/jbossweb-tomcat55.sar/META-INF/jboss-service.xml file and replace:
<attribute name="Java2ClassLoadingCompliance">false</attribute>
<attribute name="UseJBossWebLoader">false</attribute>
<attribute name="UseJBossWebLoader">false</attribute>
with:
<attribute name="Java2ClassLoadingCompliance">true</attribute>
<attribute name="UseJBossWebLoader">true</attribute>
<attribute name="UseJBossWebLoader">true</attribute>
This is to avoid class loading issues for Log4J library. Refer http://lists.xwiki.org/pipermail/users/2007-September/008503.html for more information.
Configuration XWiki to use a JBoss DataSource
- Uncomment the resource-ref section in XWiki's web.xml file.
- Modify XWiki's WEB-INF/hibernate.cfg.xml file to tell Hibernate to use a DataSource rather than a direct JDBC connection
- Copy the WEB-INF/ directory file to XWiki's