You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Harvey Rayner <ro...@googlemail.com> on 2007/03/15 17:42:27 UTC

batik server implementation problem

i'm creating a web app that uses javascript to modify svg files from user
inputs. http://www.root2art.co.uk/svg_color_selector/index.php

the next stage is to use batik to convert modified svg files to png so they
can be saved as thumb nails and used in various ways.

however, i have nil experience of java and java implementation on servers.
i'm now struggling with getting batik running on my host account.

my account has Resin installed and a private JVM. i understand batik would
run faster if started from a servlet, but i'm only wanting small files to be
processed and i guess this is not something for a novice like me.

this is what i have done so far.

i've downloaded batik binary version onto my harddrive and unzipped and
tested it and it works fine locally. i've uploaded all the batik files to my
host account to /home/MyUserName/ public_html /batik. is this first step ok
or do the batik files have to be installed in some way?



this is the code i have used to try to call the batik rasterizer.

<?php
$command = '/usr/local/jdk/jre

-jar /home/MyUserName/public_html/batik/batik-rasterizer.jar
/home/MyUserName/public_html/svg_color_selector/svg/pat02.svg
-d /home/ MyUserName/public_html/svg_color_selector/raster/pat01.png
-m image/png';
$command = escapeshellcmd($command);
$result = exec($command,$output,$retval);
?>
<?php
print 'ERROR - '.implode(",", $output);?>



when i open the php page above nothing happens and no png is appears in the
relevant directory. if i'm missing something obvious please can someone
point me in the right direction. i could call the rasterizer with javascript
if that is better.

 i've checked with my host that i have the correct full path to my java
runtime environment

i've also set the write permission to the /home/
MyUserName/public_html/svg_color_selector/raster directory to 777. this is
just a guess on my part.



if i replace the jre path to 'java' i get the following message. (don't know
if this is relavent)


ERROR - libgcj-java-placeholder.sh,,This script is a placeholder for the
/usr/bin/java,master link required by jpackage.org conventions.
libgcj's,rmiregistry, rmic and jar tools are now slave symlinks to
these,masters, and are managed by the alternatives(8) system.,,This change
was necessary because the rmiregistry, rmic and jar tools,installed by
previous versions of libgcj conflicted with symlinks,installed by
jpackage.org JVM packages.,,This script was designed to be overridden by the
supported RHEL3 JRE,packages, java-1.4.2-bea and java-1.4.2-ibm. It is
installed as an,alternative symlink as /usr/bin/java. It will override a
third-party,(non-RHEL3) JRE's java command if the JRE's bin directory is
listed,after /usr/bin in PATH. In that case, it is recommended that
the,third-party JRE's bin directory be listed first in PATH instead.



any help greatly appreciated,

harvey