First we need to get the war version of alfresco from a download site.  The one I used was Extract the contents to a temporary folder.

The next step is to set up the database.  If you’ve already installed the default version of Alfresco you’ll need to drop the database and recreate it.  Either way, you’ll find mysql scripts in extra/databases/mysql for setting up or dropping the schema.   See Using Alfresco for document management Part One for details on how to do a default install of Alfresco and for configuring Open Office.

You now need to extract alfresco.war to edit the contents. I expanded it into exploded/alfresco.war so I can copy the alfresco.war folder directly into my jboss application when I’m ready to deploy.

We need to configure the war for deployment in JBoss. You’ll find the config files needed in the extensions/extension folder. The ones we want are:

Copy these to exploded/alfresco.war/WEB-INF/classes/alfresco/extension

In you need to set the dir.root to point to where you want to store your alfresco data. Also uncomment and set the database values – don’t forget to disable the derby settings also.

Finally you need to set the external executable locations. What I did here was copy the ImageMagick and bin folders from the default Alfresco install into my root folder containing alf_data.  Otherwise you will need to install missing executables yourself.


ooo.exe=C:/Program Files/ 3/program/soffice

Now update the hibernate dialect in
# MySQL dialect (default) hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

I used JBoss 4.2.2 as my application server.  Before deploying you should edit jboss-4.2.2.GA/server/default/deploy/ejb3.deployer/META-INF/ to change hibernate.bytecode.provider from javassist to cglib.

To avoid getting permgen out of memory errors you will probably need to configure your JBOSS_HOME/bin/run.bat to increase the memory size.
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512

You can now try coping alfresco.war into your jboss application. Assuming this doesn’t cause a spectacular display of stack traces, when the server finally starts up you can try accessing the application at http://localhost:8080/alfresco.

You’re now ready to start figuring out how to use alfresco as it is, or integrate it with other applications.

Next – Creating a workspace using a web service API

%d bloggers like this: