Monthly Archives: April 2013

Installing Alfresco (4.1.1) with JBoss (EAP 5.1.1)

With your Alfresco install you may have decided that Tomcat as an application server is not robust enough. You can opt for WebSphere, WebLogic and even JBoss if you feel you require the extra functionalities. This article addresses how to install Alfresco with JBoss.

First, you’ll need the JBoss installer. I had to get mine at Keep in mind though, Alfresco still only supports 5.1.1 EAP (enterprise version of JBoss). My installer looks like this file: jboss-eap-installer-5.1.1.jar.

I also went out and got the Java JDK 1.6.0_33 to use with this. For this installation I used Alfresco Enterprise 4.1.1. You’ll want to get the .ear file for this instead of the usual .zip file you get for Tomcat.

So, getting started, install the JDK to the directory of your choice. I have to install a number of different versions of Java, Alfresco, Tomcat and JBoss so I tend to have a top level directory with each of those names and then install the particular version beneath it. My installation of Java and JBoss look this respectively:

  • /java/jdk1.6.0_33
  • /jboss/jboss-eap-5.1

Install JBoss is fairly simple. You simply run the following:

# <path_to_jdk1.6.0_33>/bin/java -jar jboss-eap-installer-5.1.1.jar

To make it simple, I’ll refer to JBOSS_HOME as my jboss directory:


Follow the instructions and install it. Next, put into a tmp directory and unzip it. You’ll also have to “unzip” the resulting alfresco-enterprise-ear.4.1.1.ear. If you need to, you can change the .ear extension to .zip to get the unzip to work.

Copy the file from the temporary directory to the <JBOSS_HOME>/server/default/conf directory as minus the .sample on the end.

Make sure you refer to this article on how to set up your repository. Remember that you’ll need to create a database, modify it for Alfresco use and set up a directory to use for your contentstore and indexes. Edit the parameters in the file to suit your environment. Save the in the conf dir.

Here are my settings. Please adjust to reflect your environment. Make sure these lines are added in your file:


Copy the alfresco.war and share.war file from the tmp directory to the <JBOSS_HOME>/deploy directory
Copy database jdbc driver to <JBOSS_HOME>/server/default/lib
Add URIEncoding=”UTF-8″ to Connector stanzas for 8080 and 8009 in both of these files:

  • <JBOSS_HOME>/server/default/deploy/jbossweb.sar/server.xml
  • <JBOSS_HOME>/server/all/deploy/jbossweb.sar/server.xml

JBoss by default can have a lot of debug entries in the logs. To squelch this a bit, edit the <JBOSS_HOME>/server/default/conf/jboss-log4j.xml file to reduce the huge debug log output:

 <priority value="INFO" />
 <appender-ref ref="CONSOLE"/>
 <appender-ref ref="FILE"/>

Add these log settings to the <JBOSS_HOME>/server/default/conf/jboss-log4j.xml file:

<category name="org.jboss.logging.Log4jService$URLWatchTimerTask">
 <priority value="INFO"/>
<category name="org.jboss.system.server.Server">
 <priority value="INFO"/>
<category name="org.jboss">
 <priority value="WARN"/>
<category name="net">
 <priority value="WARN"/>
<category name="org.alfresco">
 <priority value="WARN"/>
<category name="org.alfresco.repo.policy">
 <priority value="WARN"/>
<category name="org.springframework">
 <priority value="WARN"/>
<category name="org.hibernate">
 <priority value="WARN"/>
<category name="org.hibernate.cache.ReadWriteCache">
 <priority value="ERROR"/>
<category name="org.hibernate.cache.EhCacheProvider">
 <priority value="ERROR"/>
<category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog">
 <priority value="ERROR"/>
<category name="org.apache.myfaces">
 <priority value="ERROR"/>
<category name="org.jbpm.jpdl.xml.JpdlXmlReader">
 <priority value="ERROR"/>

Save this file and next, edit the <JBOSS_HOME>/server/default/deployers/ejb3.deployer/META-INF/jpa-deployers-jboss-beans.xml file, and then change the hibernate.bytecode.provider=javassist line to hibernate.bytecode.provider=cglib.

For example:


Add these to your <JBOSS_HOME>/bin/ file near the top:

export JAVA_HOME=/alfresco/4119/java

Then, after this line:


add these:

JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx1024m -XX:MaxPermSize=512m"
JAVA_OPTS="$JAVA_OPTS -Dalfresco.home=."

Edit the filtered packages list.

Open the <JBOSS_HOME>/server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml file, and then locate the filteredPackages property of the WarClassLoaderDeployer bean.

Open the <extension>\war-deployers-jboss-beans.xml.fragment.sample file.
This sample file contains a WarClassLoaderDeployer bean definition fragment for use when configuring JBoss.

Copy the full WarClassLoaderDeployer bean from the sample file.
In the war-deployers-jboss-beans.xml file, paste the sample bean fragment over the WarClassLoaderDeployer bean. The bean definition contains the filteredPackages list that is required for Alfresco. This list is on one line and must not contain any breaks.

Save the <JBOSS_HOME>/server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml file.

Now, the moment of truth. Go to JBoss Server <JBOSS_HOME>/bin and do:

# ./ -b  <- This will allow JBoss to bind to all ip addresses. 
*Change it to suit your environment if needed.

The alfresco.log file will be generated wherever you start it. So if you are in <JBOSS_HOME>/bin you should see it there. You can “tail” the file and follow along. Work through any issues. Try to access it like you would any other Alfresco install (http://<hostname>:<port>/share) and voila! Success! Hopefully 😉

Cheers! -H.S.