[Yanel-dev] Re: Use of ImageMagick with Yanel/Yarep

Mehmet Birgi mehmet.birgi at wyona.com
Fri Jun 25 14:59:19 CEST 2010


On Thu, Jun 24, 2010 at 11:10 PM, Michael Wechner
<michael.wechner at wyona.com> wrote:
> Cedric Staub wrote:
>>
>> On Thu, 24 Jun 2010 13:47:02 +0200
>> Mehmet Birgi <mehmet.birgi at wyona.com> wrote:
>>
>>
>>>
>>> Question: is there a platform independent way to integrate this into
>>> the Yanel build system?
>>>
>>
>> I don't think there would be an easy way to do so, considering all the
>> diffrent flavors of Linux/Unix that are out there and the various package
>> managers that they use (for example, aptitude only works on Debian/Ubuntu
>> systems). What you could probably do is check if ImageMagick is installed
>> and if not print a warning message;
>
> well, I would assume that im4java throws an exception
>
> @Memo: What does the log-file say if ImageMagick is not installed?

This is the error message Bruno had forwarded. In the log, there was
nothing special/different, as far as I can remember, only longer,, and
it was possible to see that the error originated in the method
resize() of ImageScaler, but I would have to reproduce the error to
get the whole thing, if you think it would help. The first line here
is all there was really:


           java.lang.Exception: Due to an exception the request has been
canceled. Exception message: Cannot run program "convert": java.io.IOException:
error=2, No such file or directory

           java.lang.Exception: Due to an exception the request has been
canceled. Exception message: Cannot run program "convert": java.io.IOException:
error=2, No such file or directory
               at
org.wyona.yanel.impl.resources.jellyadapterofcmdv3.JellyAdapterForCUDResource.getView(JellyAdapterForCUDResource.java:148)
               at
org.wyona.yanel.servlet.YanelServlet.getContent(YanelServlet.java:536)
               at
org.wyona.yanel.servlet.YanelServlet.doPost(YanelServlet.java:740)
               at
org.wyona.yanel.servlet.YanelServlet.service(YanelServlet.java:280)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
               at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
               at
org.wyona.yanel.servlet.communication.YanelFilter.doFilter(YanelFilter.java:37)
               at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
               at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
               at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
               at
org.apache.catalina.core.StandardContextValve.invoke(StandardC


>
>
>>  that way the system administrator knows what he needs to do in order to
>> fix it (figuring out how to install it should be the lesser problem).
>>
>> Of course, I'm no expert on the Yanel build system, so please correct me
>> if I'm wrong ;-).
>>
>
> I don't think this has much to do with the Yanel build process generally
> speaking. Especially if you are going
> to deploy binaries, which you should on a productive system!
>
> I think to improve the situation you have two options:
>
> 1)  Improve the "exception handling" of your resource type if ImageMagik is
> not installed
>
> 2) Customize/enhance the build.xml of your resource type using
> im4java/ImageMagik to output a warning
> that ImageMagik could not be found, whereas this warning should be
> ignorable, because the environment
> on which you build your binaries might not have ImageMagik installed.
>
> and of course documentation, documentation, documentation ;-)
>
> Cheers
>
> Michi
>>
>> Cheers,
>> Cedric
>>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>



-- 
Mehmet Birgi
www.wyona.com


More information about the Yanel-development mailing list