Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Pre-requisites

The webscript provided with MCF 8.1 seems to be working with Alfresco community 5.2 even though it is said to support only Alfresco until version 5.0. So it is possible that errors occurs when using versions of Alfresco greater than 5.0.

Check https://github.com/maoo/alfresco-indexer and https://github.com/Alfresco/alfresco-indexer for potential updates (else you’ll need to tune it yourself).

...

First, you need to install the Alfresco Module Package (AMP) alfresco-indexer-webscripts-0.8.1x.amp provided in the ManifoldCF distribution plugin folder (plugins/alfresco-webscript).

Copy the amp file into the alfresco installation amps directory (/opt/alfresco/amps).

...

The amp file may need to override some of the libraries contained in the alfresco war to complete the installation process. It is not allowed by default by the installer script, so we will need to force the installation. Although the installation scripts make backups of the libraries overridden in the war itself, I we would recommend backing up the war before doing the installation anyway.

Code Block
cp /opt/alfresco/tomcat/webapps/alfresco.war /backup_location/alfresco.war.bak 

...


Then you can install the amp file into the war

...

It is recommended to clear out temporary files from tomcat Tomcat before restarting alfrescoAlfresco. So, remove the files in the work and temp directory of tomcat (the script /opt/alfresco/bin/clean_tomcat.sh can give you hints about the file to remove, although all the files mentioned there were not existing on the system when I did the test. The script must be run from /opt/alfresco to work).

...

Be aware that this does not guarantee that it will be working. 

As tomcat un-compresses the war archive at the first startup only and uses the un-compressed version directly for subsequent startups, you must remove the un-compressed version of alfresco from the tomcat directory so that the new war is un-compressed and used at the next startup


Code Block
rm - R / opt opt/ alfresco alfresco / tomcat tomcat/ webapp webapp/ alfresco  alfresco  

 

Finally, you can start alfresco again

...

If  you go to http://<server_address>:<port>/alfresco/service/index/uri/ (the forward slash at the end is mandatory, you’ll get a 404 if you don’t put it) you should be able to find an entry /auth/resolve/{username} in the list (it is an alphabetical list).

If you don’t, the webscript plugin is not working properly. I did not find any errors in the logs when I was investigating this issue on an alfresco community 5.2. Everything looked ok in the alfresco.log except that the same number of webscripts were registered as before I added the extension (which got my attention) but there were no fails or any error. So carefully check the alfresco version. It is written at the top of the http://<server_address>:<port>/alfresco/service/index/uri/ page if you need it. (In my case it was because I didn’t remove the un-compressed alfresco webapp, so the version without the webscript installed was started)If you happen to try to configure an MCF authentication connector with the webscript no running properly, you will likely end up with an error as shown below:

...

This is because the connector expects a json JSON response and the alfresco is giving a 404 html page as the response to the query. This is not handled properly in the connector, leading to an exception. You need to debug why the webscript doesn’t work.