cancel
Showing results for 
Search instead for 
Did you mean: 

Custom transformation not able to read/write to/from temp

kayachi
Champ in-the-making
Champ in-the-making
Hello all,

I'm a newbie to both Alfresco and Tomcat, so forgive me if my question is a foolish one! However, I've intensively searched the internet and found no reference to my problem.

I'm trying to implement a custom content transformation based on the  RuntimeExecutableContentTransformer class.
I've set up the appropriate .xml file and the transformer is loaded properly.

Here's the problem:
The invoked script (or executable) can't read and write the $target en $source files. ($CATALINA_HOME/temp/Alfresco/RuntimeExecutableContentTransformer_source_xxxxx.* and $CATALINA_HOME/temp/Alfresco/RuntimeExecutableContentTransformer_target_xxxxx.*)

It can however write to other files in this directory from the script, just not the ones created for that particular transformation.
The files seem to be locked, but I can modify them by hand from the linux shell, even while the transformation-process is running.

Alfresco is running under the root-context. File permissions are set appropriately.

I'm using the standard Tomcat/Alfresco 2.0 distributable with Debian Etch and MySQL 5.

Any help would be greatly appreciated.

Thanks,
K. Ayachi
2 REPLIES 2

kayachi
Champ in-the-making
Champ in-the-making
Hello all,

Our lead develloper solved the issue.

We had to remove the single (or double) quotes around the variables in the following snippet of code in the .xml file.

<entry key="Linux">
  <value>/usr/local/bin/tif2txt.sh ${source} ${target}</value>
</entry>
Turns out that alfresco already supplies the quotes when exploding the variables.

So this example: http://wiki.alfresco.com/wiki/Content_Transformations seems to be faulty (unless tidy handles this well)
This example: http://wiki.alfresco.com/wiki/Tiger_OCR_integration I'm not sure of, since I don't know how Windows handles this.

Hope this helps anyone with the same problems.

steve
Champ in-the-making
Champ in-the-making
Hello kayachi,

Thanks for posting your resolution.
Unfortunately, we have found that different flavours on Linux require different quoting mechanisms, or indeed no quotes as you have found.

Also that Windows does require quotes.

There is a note in the Linux release notes about the problem for our config of ImageMagick but you probably would not have linked that to your issue.

Steve
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.