Thursday, July 12, 2007

How to setup a WCMS

OK I am going to try to setup alfresco 2.0 WCM on JBoss AS using Hypersonic SQL as database.
I am using HSQL because the can easily be zipped and distributed to fellow developers.

As usual I'll first create a dedicated server configuration and name it alfresco20, this instance can be started using <jboss-root>/bin/run.sh -c alfresco20.

Upfront I know that the alfresco.war must be deployed exploded in JBoss. So the war file is unzipped into <jboss-root>/server/alfresco20/deploy/alfresco.war.

Two issue's arise immediately:
  1. Alfresco has a version of log4j packaged in the war, this generates ClassCastExceptions, so the log4j is removed from alfresco.war/WEB-INF/lib.
  2. The log4j configuration in JBoss lacks a root logger, and alfresco generates a lot log messages, so I opened <jboss-root>/server/alfresco20/conf/log4j.xml, and added <level value="warn"/> to the <root> element.
Configuring HSQL as database for alfresco is properly documented at the alfresco wiki, I know because I did it myself ;-)

When starting JBoss, after quite a while and a lot of warn and info log messages on the console, the server is started. Checking the base functionality at http://localhost:8080/alfresco shows the login page.
But this merrily is alfresco's CMS not the WCM version, so stop the server again, either via the jmx-console or using Ctrl-C.
According to the readme that comes with alfresco's WCM, the wcm-bootstrap-context.xml file needs to be placed in the <jboss-root>/server/alfresco20/conf/alfresco/extension directory.

That should be it, unless the website preview feature is needed. For now lets first try if this works as suggested. After starting JBoss again using the above command, the server starts without a problem, and when browsing to the alfresco page, I get presented with the login screen. So the JBoss server appears to be working fine.
Now lets start the virtualization server.

Out of the box, the virtualization server did not need any configuration and it started without any problem. Great.

Now I want to evaluate the functionality supplied, but that'll have to wait till next time.

No comments: