Alfresco community 3.2 installation on glassfish

1 Get alfresco war files for deployment in existing application servers package file  alfresco-community-war-3.2r2.tar.gz from

2. MySql setting

mysql>create database alfresco;

mysql>grant all privileges on alfresco.* to ‘YOUR_ALFRESCO_USERNAME’@’%’ identified by ‘YOUR_ALFRESCO_PASSWORD’;

mysql>grant all privileges on alfresco.* to ‘YOUR_ALFRESCO_USERNAME’@’localhost’ identified by ‘YOUR_ALFRESCO_PASSWORD’;

3. Create alfresco libray folder on glassfish

mkdir /usr/lcoal/glassfish/domains/domain1/lib/classes/alfresco

4.Unpacke alfresco-community-war-3.2r2.tar.gz

tar vzxf alfresco-community-war-3.2r2.tar.gz

5. From the directory in which you unpacked the Alfresco bundle, copy the entire contents of the extensions directory to the glassfish domain library /usr/lcoal/glassfish/domains/domain1/lib/classes/alfresco

cp -rf extensions/*  /usr/lcoal/glassfish/domains/domain1/lib/classes/alfresco

6. Create alfresco documents and index folder

mkdir /usr/local/alfresco

7. Modify alfresco config files for glassfish (/usr/local/glassfish/domains/domain1/lib/classes/alfresco/extension)so alfresco can find database and index folder created before

two files should be edited

cd /usr/local/glassfish/domains/domain1/lib/classes/alfresco/extension

Set alfresco folder
dir.root = /usr/local/alfresco

Set dababase username and password


Comment out the lines for derby and uncomment the lines for MySQL


In, comment out the line for Derby and uncomment the line for MySQL

8 The Alfresco war file has a WEB-INF/web.xml deployment descriptor that doesn’t comply with the DTD, you need to replace this file and add a Glassfish specific deployment descriptor that will allow Alfresco to use MyFaces instead of JSF.

Get these two files from,

Change to the unpacked directory created from alfresco-community-war-3.2r2.tar.gz, create a new directory named WEB-INF and copy the above two files into it. Now update the alfresco.war file using the Java jar command

jar -uvf alfresco.war WEB-INF/*.xml

The alfresco.war should be edited.

9 Increase glassfish memory heap setting
Log in as administrator of glassfish from http://glassfishHost:4848/
Application Server->JVM Settings->JVM Options
Change -Xmx256m to -Xmx512m or more.

10 Deploy the new war file to glassfish.
Log in as administrator of glassshfish from http://glassfishHost:4848/ and deploy alfresco.war.
After a few minutes, alfreso can be visited by hppp://glassfishHost:8080/alfresco

Useful links:


  1. manfred

    I installed alfresco 3.2 successfully after increasing computer memory to 1.500 Meg, deployed share of version 3.3 without problem (share of 3.2 broke down while deploying), but got only a blank screen. I added the snapshot jar as described above, the server operated somewhat by following to but completed still with a blank screen.
    I am neither an alfresco or glassfish expert – no idea where to debug this.

    • Sean Ye

      Hi, did you add the WEB-INF/sun-web.xml to the alfresco.war?
      I think alfresco is based on tomcat so we need sun-web.xml to define the “useMyFaces” property for alfresco on glassfish.
      I got the same problem before now I had solved it out by adding sun-web.xml for alfresco.war.

      • manfred

        I got the alfresco (comm. 3.2) package by itself running perfectly fine after adding the sun-web.xml. I deployed share (comm. 3.3) fine, but see a blank page when I go to “..:8080/share/”. Log files complain about MyFaces and RI being in the class path at the same time as well as a missing login page as required.
        The jvm log shows half a mile of complaints about dependency_failed…concrete-type. ..xerces.. ..NameSpaceSupport..” etc.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s