Thursday, April 21, 2011

Alfresco 3 Setup with JBoss 4.2.3

Alfresco 3 download (wiki.alfresco.com/)

*) JDK 6 was installed in C:\java.

*) Unzip jboss-4.2.3.GA.zip file in C:\Java.

*) Install MySQL 5.0.18
Copy mysql-connector-java-5.1.13-bin.jar file in C:\Alfresco\jboss-4.2.3.GA\server\default\lib
Execute the DB Script (alfresco-labs-war-3Stable\extras\databases\mysql\db_setup.sql).

*) Create one folder(alfresco.war) in C:\Alfresco\jboss-4.2.3.GA\server\default\deploy\ 
Unzip alfresco.war in C:\Alfresco\jboss-4.2.3.GA\server\default\deploy\alfresco.war.

*) Create one folder(share.war) in C:\Alfresco\jboss-4.2.3.GA\server\default\deploy\ 
Unzip share.war in C:\Alfresco\jboss-4.2.3.GA\server\default\deploy\share.war.

*) Copy alfresco-labs-war-3Stable\commands\bin and alfresco-labs-war-3Stable\commands\ImageMagick folders to C:\Alfresco\jboss-4.2.3.GA\bin folder.

*) Create a conf directory for alfresco and move the distribution extension folder.
   i.e., Copy *.* files from alfresco-labs-war-3Stable\extensions\extension folder to C:\Alfresco\jboss-5.1.0.GA\server\default\conf\alfresco.

*) Edit run.bat file in C:\Alfresco\jboss-4.2.3.GA\bin 
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=128m
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dalfresco.home=.
*) Edit C:\Alfresco\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\server.xml and C:\Java\jboss-4.2.3.GA\server\all\deploy\jboss-web.deployer\server.xml and add URIEncoding="UTF-8" to the section
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="250" maxHttpHeaderSize="8192"
For example:
<Connector port="8080" URIEncoding="UTF-8" address="${jboss.bind.address}"
maxThreads="250" maxHttpHeaderSize="8192"

*) Edit \jboss\server\default\deploy\ejb3.deployer\META-INF\persistence.properties and change the line:
hibernate.bytecode.provider=javassist
to
hibernate.bytecode.provider=cglib

*) Run the application by using run.bat in C:\Java\jboss-4.2.3.GA \bin 
*) Test application by using URL:http://localhost:8080/alfresco 
*) The default UserID:admin and Password:admin

WCM Integration:
==============
*) Get alfresco-labs-wcm-3Stable.zip and unzip it.
*) copy the file wcm-bootstrap-context.xml to the Alfresco<extension> directory (C:\Java\jboss-4.2.3.GA\server\default\deploy\alfresco.war\WEB-INF\classes\alfresco\extension).
*) Restart JBoss

Verifying the WCM installation
=======================
*) In alfresco.log, search for the following text:
The Web Forms folder was successfully created: and The Web Projects folder was successfully created:
*) Check that the following additional spaces are in your Alfresco repository:
• Web Projects in Company Home
• Web Forms in Data Dictionary