JBoss Installation

Version 13.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.

Log4j Error

Warning

It was reported that with XWiki 1.6 and JBoss 4.0.4, these settings change would generate an error with hibernate. Everything seems to work fine without these settings including classloading of log4j

  • 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>

with:

<attribute name="Java2ClassLoadingCompliance">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 jboss-web.xml file to XWiki's WEB-INF/ directory

Get Connected