Posts Tagged ‘Alfresco’

Alfresco 4: Restoring From a Cold Backup (Windows)


For the sake of this article, assume Alfresco 4 has been installed to C:\Alfresco (the application directory) and that the dir.root directory is C:\Alfresco\alf_data. The name of the database being used is simply “alfresco“.

This article assumes you have been following the Alfresco cold backup procedure documented in the following Alfresco Wiki page. Note that it is essential that you are keeping a dump of the Postgresql database along with a copy of the dir.root data directory from the point in time of the database dump.

There are a couple of changes to the restoration procedure on that Wiki page when it comes to Alfresco 4. This is mostly down to the fact that it uses the Postgresql database platform. You may have noticed that the database files are stored in ‘dir.root/postgresql’  directory which complicates things a little? OK, the restoration procedure is as follows:

Read the rest of this entry »

Alfresco: Change Company Home Name

Comments Off

To change the “Company Home” name in Alfresco Explorer you must perform the following configuration:

  • Stop the Alfresco service.
  • Find the appropriate webclient properties file for your language. For example, to change this setting for English (US) you would open and edit the following file in a text editor: 


  • You will see this file containts a list of key/value pairs. Do a search for “Company home” and edit the value accordingly.
  • Restart Alfresco.

Enable Versioning For All Documents In Alfresco 4


Version of Alfresco used:  4.0b

The following steps show how to enable version control for all documents in Alfresco 4. In a nutshell, you are essentially adding the “Versioning” aspect as a mandatory part of the cm:content property (of which all content is derived).

Step 1:  Edit “contentModel.xml” File

  • Open the “contentModel.xml” configuration file in a text editor. This is found in “tomcat/webapps/alfresco/WEB-INF/classes/alfresco/model”.
  • Note that in previous versions of Alfresco this file was called “content.xml“.

Step 2:  Add in the Versionable Aspect

  • Find the “cm:content” type. This starts on line 83. In Windows, do CTRL+F and search for “cm:content”.
  • After the closing “</properties>” tag, add in the following text:


  • Restart the Alfresco service.

To verify this has worked, add a new document to the system and check its properties. Its “Version History” block at the bottom of the properties screen should already be enabled.

How to Remote Debug an Alfresco Windows Service in Eclipse

1 Comment »

This article refers to Tomcat 6 and Alfresco 3.4.0


So you have the Alfresco system installed on the Microsoft Windows platform and it is installed as a service. You have trawled the web for hours trying to figure out how to enable remote debugging from Eclipse. A lot of sites talk about changing the Tomcat configuration and you’ve tried modifying all the .bat files in the tomcat/bin folder within your Alfresco installation and nothing works?


This problem is compounded by lots of conflicting information on the web with some resolution methods to be used on a UNIX install rather than Windows or with the Windows version when it is not installed as a service.  You may have seen the following argument string to be included in the Tomcat configuration mentioned but don’t know where to put it?

-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

The answer, it turns out, is not so easy to find. Essentially you need to configure the “alfrescoTomcat” service by doing the following:

1.  Open a Command Prompt (START –> Run –> cmd).
2.  Change to the “tomcat\bin” folder (e.g. cd c:\alfresco\tomcat\bin).
3.  Enter the command tomcat6w.exe //ES//alfrescoTomcat which launches the service configuration dialog box. Note that if you try to run the executable by double-clicking it you will get the following error message:

The specified service does not exist as an installed service.

4. Click on the JAVA tab and enter the following text at the bottom of the “Java Options” field as per the below screenshot (note that that line break is significant):


Alfresco Service Config

Alfresco service dialog box.

5.  Close the dialog box and restart Tomcat. The easiest way to do this is to restart the Alfresco service from the Start menu (i.e. START –> Alfresco Community –> Alfresco Community Service).

You should now be able to connect to Tomcat from Eclipse by doing the following:

1.  Open Eclipse.
2.  Select “Debug Configurations…” from the “Run” pull-down menu.
3.  Double-click “Remote Java Application” to create a “New_configuration” profile.
4.  On the “Connect” tab, browse to the project you want to debug.
5.  Change the “Port” in “Connection Properties” to 8000.
6.  Leave all the rest at the defaults and click the “Debug” button to start debugging!