Bloggers recientes


[ Blog ]
[ Wiki ]
[ Slideshare ]
[ Twitter ]
[ YouTube ]
Cesar Capillas Mensajes: 189
Estrellas: 8
Fecha: 16/08/16
Gustavo Fernandez Mensajes: 91
Estrellas: 7
Fecha: 5/04/16



noBlogo - El blog de

Watching your Libreoffice process for Alfresco transformations
A usual question of final users is that their Office files are not being previsualized in Alfresco. This may be for some reasons like:
 1. The office file is corrupted
 2. The office mimetype is not set correctly
 3. The office file is too big
 4. The Libreoffice process is not responding
In the last case, you will see that new MS-Office and Office documents are not being previsualized (any of them). In that cases, the first thing you should do is to check the Libreoffice process, by default in 8100 port:
  ps aux | grep soffice
If this process does not exist, or it seems to have problems, the manual solution is to restart Libreoffice just with a simply:
  $ALF_HOME/ start libreoffice
Sometimes it is necessary to kill the pid of the Libreoffice process, previously.
But there are better alternatives for the Alfresco admin. The first one is based on a nice plugin and a quartz job:
where you can define the corresponding cronjob in
contentreich.officeWatchDog.cronExpression=0 */10 * * * ?
Another simple solution is script in the crontab:
#! /bin/bash
# m h  dom mon dow   command
#0,15,30,45 * * * * /opt/alfresco/bin/
if [[ -z `/bin/pidof ".soffice.bin"` ]]
  $ALF_EXE start libreoffice
  echo "$ALF_DATE" >> $ALF_LOG
The log will help you to track if you have many problems with Alfresco transformations and OODirect subsystem. If this happens, consider to have memory enough for the soffice process.
You can also use the next script for reference for starting Libreoffice:
And finally, in Enterprise Edition (although in this case, it is tracked via Jodconverter subsystem) you can also restart the Libreoffice subsystem via JMX, or to set multiple instances to jodconverter via Admin Console.
NOTE: In Alfresco 5.1.e you need to change to the correct location of libreoffice script (assuming an installation with the linux installer and including libreoffice). Anyway you can always run:
zylk@alf5:/opt/alfresco51e/libreoffice/scripts$ sh start : libreoffice started at port 8100
In change:
Also the script needs to remove the slashes. Check this:
NOTE II: In Ubuntu you may also need:
sudo apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2 libxinerama1 libglu1-mesa
My top Alfresco Addons
Recently we upgraded to Alfresco 201602GA (5.1.e CE) with all their new capabilities such as smart folders, new admin console or model manager. But once you installed Alfresco CE (or EE), you always need some extra Community power. This is a selection of our favourites for our Alfresco installations.
1. Javascript Console: Simply fantastic, essential plugin for administrators and developers in Alfresco installations. 
Also execute script addon in Share extras is quite useful in 5.x version , but it needs some changes for make it work in recent versions
2. Alfresco Site Creators: I do not remember a recent Alfresco Installation without this customization. Must have!
3. Alfresco Site Space Templates: The missing templates for Alfresco Sites.
4. Libreoffice Edit Online: No applet based, simple as webdav based edition hyperlink for protocol registering.
5. Uploader Plus: How many times does a client ask you for filling metadata before uploading the document ? 
6. Alfresco List Manager: Dynamic Lists administration for your Alfresco Share forms and content models. A simple way for avoiding redeploying constraint lists in content models continuously. It is very useful, when these data is not completely static, for example a list of clients.
7. Alfresco Bulk Import v.2.0: Enhanced Bulk Import Tool for (not inplace?) content migrations.
8. Trashcan Cleaner: Do no forget to take out the thrash.
9. PDF Toolkit: Useful PDF actions for content rules split, merge and many more.  
10. Alfresco Audit Analysis and Reporting: The BI reference project for Alfresco Suite.
For Alfresco 4.x users Audit Share is a very very nice addon -->
11. Alfresco Groovy Runner: Nice console for accesing Alfresco Java API. Well documented, with many examples.
12. Alfresco version by name: Very nice customization for the default behaviour when uploading documents in Share. 
Other admin basics for EE users are:
1. Support Tools for Enterprise Edition: A "must" have for every Alfresco Enterprise installation.
A JMX console like JMX term is quite useful -->
2. Alfresco Nagios Plugin: A very useful check_jmx plugin for Alfresco (more adequate for Enterprise Editions) although basic ports monitoring and checks are also valid for Community Edition. 
More links:
Change Alfresco ports in Alfresco 5
Sometimes we need to change the main ports of an Alfresco web application (i.e 8080 --> 9080), for example for running another Tomcat based app in your machine. This is a tip for Alfresco 5.x
* Change 8080, 8443, 8009 and 8005 connector ports in $ALF_HOME/tomcat/conf/server.xml
* Change JPDA 8000 in  $ALF_HOME/tomcat/bin/ if used
* Change 8080, 8443 ports in $ALF_HOME/tomcat/shared/classes/
* Change 8080 ports in $ALF_HOME/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml urls (at least 5 urls by default)
* Change 8080 and 8443 in: 
In Alfresco 4.x (with SOLR 1.4) you need :
If for any reason you have to run two Alfresco repositories in the same machine, you may have other port conflicts relating RMI (50500), FTP (2121), CIFS (1445,1137-1139), IMAP (1443) , SMTP (25), Hazelcast (5701) or Libreoffice (8100). You may need to check this:
Java AutoCloseable interface

He estado haciendo unas prubas mínimas con las interfaz autocloseable introducida en java 7 ... y la verdad es que está muy bien y hace que quede el código típico de try{} cath{}  finally{} mucho más limpio. Dejo aquí un ejemplo básico de uno de sus posible usos.

public class HBaseUtil implements AutoCloseable
    private Connection connection;
    public HBaseUtil() throws IOException
        Configuration  conf = HBaseConfiguration.create();
        conf.set("zookeeper.znode.parent", "/hbase-unsecure");
        this.connection = ConnectionFactory.createConnection(conf);
    private Connection getConnection()
        return this.connection;
    public void add() throws IOException {
        //add element code
    public void close() throws Exception {
    public static void main(String[] args) throws IOException
        try (HBaseUtil hbu = new HBaseUtil())
        } catch (Exception e) {
            // TODO Auto-generated catch block


Share action to copy an Alfresco link in your email client
Some time ago, we published an Alfresco addon for editing online with Libreoffice in Alfresco Share (via webdav protocol), in github. For this plugin, that works in Alfresco 4.x and 5.x versions, we need to register a protocol for using webdav url scheme (dav: or in our operating system. Recently, we made an update for Libreoffice 5.x in github.
Taking a similar aproximation, we developed another simple action for copying directly an Alfresco download URL via mailto: protocol, which is already registered in our OSes. I mean, when clicking in the corresponding action, your email client is opened with the download url for the file copied in the body of a message. Between the different download urls available, we chose http webdav url for getting some information about the paths and filenames. The github project is available here.
In fact, this is done in a similar way, when sharing a public url via email, but for public content.
This action is available in both Document Library and Document Details menus. The details menu is shown below:
When clicking for the first time and if a default application is not defined for the mailto: protocol (or url scheme), the browser will ask you for an application. Click in the right app and remember the chosen application. In the figure, I selected Zimbra, which is my email web client.
Finally, you will get something like this:
Mostrando el intervalo 1 - 5 de 320 resultados.
Resultados por página 5
de 64