Hi Chandra,

    My first guess would be that Java can't find the
X display (are you logging the output of Java/Batik anywhere
in the 'service' case?).  The simplest solution to this,
if you are using Java 1.4, is to use headless mode.  Search
the net for 'java headless' and you should get all
the info you need (including other workarounds
if this isn't feasible).

Chandra wrote:


Hi,
I tried to generate JPG from SVG.
In Windows environment it is working well. I'm getting problem while generating JPG file in specific cases on RedHat Linux ES 3.0 environment.
The following are the lines of code used by me to create jpg.
istream = new StringReader(contentSVG);
trans = new JPEGTranscoder();
input = new TranscoderInput(istream);
ostream = new FileOutputStream("filename.jpg");
output = new TranscoderOutput(ostream);
trans.transcode(input, output);
In Case1 when I directly execute this program it is working perfectly. Even though the user who is executing this is not a root user.
In Case2 When this program is called by another service. The service was started by non-root user. In this case it creating the file called "filename.jpg" and after that trans.transcode() method is not updating the file so the size of the file same as 0 bytes.
The service was started by root user. Everything working fine. The file creating and file updated with the bytes so the actual jpg image exist in the file. If you anyone have any idea on this problem could you please guide me.
Regards,
Chandra


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to