cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Prev Rel 5 Tomcat Windows bundle: ImageMagic Error

alexr
Champ in-the-making
Champ in-the-making
Can somebody tell me how to remedy the following
execution failure on the ImageMagickContentTransformer:

Excerpt from alfresco.log:


19:27:42,406 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert "C:\alfresco\tomcat\temp\Alfresco\ImageMagickContentTransformer_init_source_29509.gif" "C:\alfresco\tomcat\temp\Alfresco\ImageMagickContentTransformer_init_target_29510.png"

The installation is on a Windows XP platform and with the exact releases of Java SDK,  MySQL and no changes to the default installation described in the readme file for this preview bundle (Alfresco Windows TomCat Preview Release 5)

Kind Regards,

Alex  Smiley Very Happy
8 REPLIES 8

a5sk4s
Champ in-the-making
Champ in-the-making
The file installer/README_tomcat_win.txt in the source distribution contains the following information:
. If the following errors are reported on the console:
ERROR [AbstractImageMagickContentTransformer] JMagickContentTransformer not available:
ERROR [AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert …
  The are not issues which will cause the server to fail, Alfresco is reporting the fact that various external document transformation engines are not available for use by the server. Either follow the instructions at the bottom of the Release Notes Wiki page:
- http://www.alfresco.org/mediawiki/index.php/Preview_Release_5
  or remove the transformer references completely if you don't require them:
- http://www.alfresco.org/forums/viewtopic.php?t=90

referring to the following section of the wiki page:

Notes: The graphics transformation as provided uses ImageMagick

In the Windows bundles, a static executable imconvert.exe is included and needs to be placed somewhere in the path (e.g c:\windows) If you install ImageMagick separately, you will need to copy or rename the standard convert.exe to imconvert.exe - this is to avoid conflicts with the Windows convert command
On Linux, you will need to install ImageMagick (http://www.imagemagick.org/script/binary-releases.php) and add a symbolic link, e.g 'ln -s convert imconvert'

alexr
Champ in-the-making
Champ in-the-making
Thanks a5sk4s,

Guess I should take a look at the WiKi pages first before
posting.

Kind regards,

Alex

townxelliot
Champ in-the-making
Champ in-the-making
I'm also having issues with ImageMagick (on Ubuntu Linux "Warty"). I have installed it, and I have symlinked imconvert to convert. This is the message I get in my Tomcat logs:


09:42:35,063 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
RuntimeExec:
   command: imconvert "/opt/alfrescorc1/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_source_46360.gif" "/opt/alfrescorc1/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_46361.png"
   exit value: 1
   stdout:

   stderr:
imconvert: unable to open file `"/opt/alfrescorc1/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_source_46360.gif"': No such file or directory.
imconvert: missing an image filename `"/opt/alfrescorc1/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_46361.png"'.

If I run the command from the command line (i.e. cut and paste it from the Tomcat log), it works fine. Also, the file which Alfresco comments on whith "No such file or directory" does actually exist. I'm running this as root, both from the command line and Alfresco itself, so I imagine it's not a permissions issue.

I attempted to get JMagick installed and working, but this was nightmarish and I gave up.

Any ideas?

steve
Champ in-the-making
Champ in-the-making
Hi,

I also encountered this error but the conversions all worked from within the application - just not at startup.

Can you try a conversion from within the application and let us know if it works.

Thanks,

Steve

townxelliot
Champ in-the-making
Champ in-the-making
I've tried putting a rule in place to convert anything with .gif in the filename into a JPEG in the same directory. This doesn't appear to be working either. There are no messages in the logs (either alfresco.log or catalina.out) which give an indication of what the problem is.

melw
Champ in-the-making
Champ in-the-making
Hi

Can I check that this is not a "Runtime.exec is not a shell problem". I ran a very quick test this morning. The original command in contentServices.xml is defined as something similar to:

imconvert.exe "${source}" ${opts} "${target}"

I changed the command definition to:

convert ${source} ${opts} ${target}

Note, I removed the quotes around the $source and $target. I re-ran the test case on SuSe Linux 9.3 and Ubuntu 5.10 and it seemed to work.

Thanks and kind regards
Mel.

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

I just checked and your correct, the quotes need to be removed on Linux (I checked on Fedora Core 4).

I have raised this as AR-280

Thanks,

Steve

melw
Champ in-the-making
Champ in-the-making
Hi

I just thought I better follow up my last post. Something you may be aware of:

I have read and confirmed that the Runtime.exec(String command) does not handle filenames that have spaces very well (even if escaping the spaces). Using Runtime.exec(String[] args) seems to provide a solution. The Alfresco RuntimeExec class uses Runtime.exec(String command).

I'm not sure if if this is an issue for the repository but I hope it is of some use.

Thanks again
Mel.