Wednesday, January 27, 2010

Alfresco FirstFoundationClient (How to setup and Run)

With this blog you will be able to setup and Run FirstFoundationClient sample of Alfresco.

1. Import FirstFoundationClient Project in eclipse (Assuming you are using eclipse).
2. Specify repository properties with “source/alfresco/extension/”.

# Sample custom content and index data location


# Sample database connection properties

3. Create New file “” under “source/alfresco/extension”.
# Sample Hibernate configuration for changing Database dialect
# For a full list:

# PostgreSQL dialect
hibernate.query.substitutions=true TRUE, false FALSE

4. Create new bean definition “hibernateConfigProperties” in “source/alfresco/extension/custom-repository-context.xml”.

<bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">

<!-- Override hibernate dialect -->

5. Run with main method.

1. If you are using PostgreSQL or any other database please provide driver classpath or add additional jar to your project.
2. If your alfresco tomcat server is already Running Please try to change avm.jmxrmi.port from 50500 to 50502 and avm.remote.port from 1313 to 1315 in “/source/alfresco/extension/”.


  1. Hi, I have ran this example and managed to do some basic things i wanted to try.
    It is all fine but when I restarted my alfresco server then i came across a stackTrace which told me that it was unable to load the application context ...
    I fixed this by dropping my database and alf_data directory.
    Re-started, all fine, shut down and re-re-started again to make sure it works fine.
    Then I tried the very example that I found in the SDK "untouched" which ran fine but when I tried to re-re-re-start my server :"Ka-Boom" it was crashed again ...
    Tried with the "Daguerre method" by removing examples code line one by one, always the same, fianlly seems like it is "ApplicationContextHelper.getApplicationContext();" that causes the crash.

    If you have any idea of what the cause could be ?

    I work on Ubuntu [9.10 Karmic Koala]
    I have an official [jdk1.6.0_14] (not the openJdk)
    My server is on [Alfresco Enterprise Edition 3.2r]
    My SDK is [alfresco-community-sdk-3.3]
    (please let me know if you want more informations like the stacktrace I get or anything else)

  2. Ok I figured out where this problem came from (sdk and server version mismatch ... stupid me ... bad me) ...

    But now I have both on the same version (3.2r enterprise)

    I still get problems but it is a horrible stacktrace that I wont post here, if you feel like you want to help some poor lost student please go there :

    Thanks in advance :D