HI, Ute,

This sounds very much like a permissions problem. It looks like gifsicle is throwing that first "Error with conversion" because it can't open a file which is cascading to the other errors.

You say that you are logged in as root. I presume you mean that when you "...open a terminal on the server and copy..." you are logged in as root. If that's the case, my first question is what user is your WO app running under?

When your WO app is running, do a ps command on Terminal to see what user it is running under. Then do an "su" command to that user on your terminal and try running the gifsicle command manually again as that user.

The other possibility (less likely) is that the user environment for your running WO app is missing some critical parameter for gifsicle. To test that, you might copy the following to a shell script:

#! /bin/sh
{
        echo "I am:"
        who am i
        echo "\nI am executing within the directory:"
        pwd
        echo "\nMy environment is:"
        env
} > /tmp/testoutput.txt

If you exec that little shell script from within your WOApp instead of gifsicle, it should answer all of the above questions. You will find the answers, of course, at /tmp/testout.txt.

Regards,
Jerry

On Feb 10, 2007, at 5:56 AM, Ute Hoffmann wrote:

Hallo,
I'm sorry for this off topic post, but im pulling my hair after hours of testing and looking and perhaps someone sees what I miss.

I need to call gifsicle from a java process to optimize .gif images (as imageMagick fails to do so and getting it working with ImageMagick seems to either need a very old IM version or some tuning of the tifflib. I looked into it but descided not to).

This is what I want to do:

call a exec from my java function which hands over the correct infos to gifsicle and gifsicle reading the file in and writing it optimized back to disk.

This is the error I get:
Fehler bei der KonversionTTGifsicle$Exception: Could not exec process: /usr/local/bin/gifsicle < /Library/WebServer/Documents/ cmsboard/ttwcmsdaten/bilder/tmp/26basispaket9.gif > /Library/ WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/ute_nn.gif: not found. invocation line: /usr/local/bin/gifsicle < /Library/ WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/ 26basispaket9.gif > /Library/WebServer/Documents/cmsboard/ ttwcmsdaten/bilder/tmp/ute_nn.gif. error output: null

The file is there. When I open a terminal on the server and copy
/usr/local/bin/gifsicle < /Library/WebServer/Documents/cmsboard/ ttwcmsdaten/bilder/tmp/26basispaket9.gif > /Library/WebServer/ Documents/cmsboard/ttwcmsdaten/bilder/tmp/ute_nn.gif

into the terminal gifsicle does as asked. Only difference aside from java involved/not involved: I'm logged in as root

So:
a) Do you think that what I see here is a permission problem
b) Has someone experience with calling gifsicle from java and could perhaps give me a code example of the call.

Thank you for some insight.

Regards

Ute

P.S:
This is my call:

String[] cmdArray = new String[] {
"/usr/local/bin/gifsicle "+"< "+sourceFilePath+" > "+outFilePath
};

NSMutableArray stdErrContents = new NSMutableArray();
NSMutableArray stdOutContents = new NSMutableArray();
int resultCode;
try {
resultCode = exec( cmdArray, stdOutContents, stdErrContents );
}
catch ....
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jerrywwalker% 40gmail.com

This email sent to [EMAIL PROTECTED]


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems

    [EMAIL PROTECTED]
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to