Running Alfresco 3.3 with embedded database (H2 in PostgreSQL compability mode)

Alfresco is a very good open source content management system, however there is only one problem with Alfresco, testing. It is a complete headache, writing an integration test, forget it! You will end up with functional tests;

  • fire up an Alfresco instance
  • use one of the existing interfaces to setup some test data
  • and finally do your test

Unfortunately, starting from version 3.2 you cannot even do that and why?

Because starting from version 3.2 the sql scripts are out-dated and Alfresco is not working with any of the memory databases, not with Derby, not with hsqldb…

To see the related issue on this matter click here.

Luckily we have h2database and it can impersonate –thanks to compatibility mode– other databases that Alfresco has support for.

All you have to do is to add h2database to your classpath and change your driver, jdbc url and dialect. I did not test Oracle or MySQL compatibility modes but it is working with PostgreSQL.

READ  How to fix an Adobe Edge Html5 animate that restarts the loop

By this way you can still do your automated tests.

Leave a Reply

Your email address will not be published. Required fields are marked *