On Sat, Oct 18, 2008 at 08:03:05PM +0200, Stephan wrote:
> Stephan wrote:
> >>> I want to run [EMAIL PROTECTED] under windows in batikAgent Mode.
> >>> Some weeks ago it worked well. Now I returned from vacation, updated the 
> >>> client and now it's broken :(
> > Is maybe FOP a requirement now? It is not mentioned on the wiki, but the 
> > fop distribution contains also a batik-all.jar together with other libs 
> > like avalon and commons that would be missing next...
> >
> > http://xmlgraphics.apache.org/fop/
> >
> > My guess is that fop-transcoder.jar is the same than fop.jar
> >
> > I'll give it a try, but maybe someone can confirm this.
> >   
> The FOP jars copied into batik folder solved the classpath checking. But 
> now it won't start the java.

I'll have to investigate these jar issues further, or perhaps somebody
on the list with more knowledge of batik could look at it?

> I've included a print to see what it is trying to start:
> 
> starting: start /B /LOW .\java -Xms256M -Xmx1350M -classpath 
> .\batik-agent.jar:.\xercesImpl.jar:c:\tilesAtHome\batik\batik.jar:c:\ti
> lesAtHome\batik\fop-transcoder.jar:c:\tilesAtHome\batik\avalon-framework.jar:c:\tilesAtHome\batik\commons-logging.jar:c:\tilesAtHo
> me\batik\commons-io.jar org.tah.batik.ServerMain -p 18123
> Can't exec "start": No such file or directory at 
> lib/SVG/Rasterize/Engine/BatikAgent.pm line 165.
> Error exec'ing "start": No such file or directory at 
> lib/SVG/Rasterize/Engine/BatikAgent.pm line 165.
> 
> 
> This is on a WinXP SP3, Perl 5.10.0
> 
> 
> Looks like exec can not be used to launch "start" as this is an internal 
> command of cmd.exe. Did the batikAgent work for anyone before?

Looks very much like nobody at all tried running batik or batikagent
since the rasterizer merge, since many of the issues you've found will
have effectively stopped it from working.

> I'm no perl expert. Reading http://perldoc.perl.org/functions/exec.html 
> suggests that using exec is wrong anyway as it would never return.

exec isn't wrong there since it's forked first, so it's only a
subprocess that will never return.

> I replaced the exec with a system call, now the starting looked a bit 
> better.
>         system(@cmd) == 0 or

How this works any better is beyond me, since that will do an exec
internally, and logically shouldn't find start if exec can't find it.

I've removed the start bit from the code, it's an ugly way of doing
process priority changing anyway, there's bound to be nicer ways to
do it.

> But it opens the java folder insted of executing java due to the ".\java":

The actual problem here is that it found the java folder in
tilesAtHome instead of java.exe. I've changed a couple of things so
that it will now make sure it's actually returning a plain file, and
it will only look for java.exe on windows (and only plain jaja
everywhere else)

> Timeout waiting for batik agent to start at 
> lib/SVG/Rasterize/Engine/BatikAgent.pm line 179.
> 
> 
> So my next modification was in batik.pm to return a path without the .\ 
> in front:
>                 my $filepath = 
> File::Spec->canonpath(File::Spec->catpath($volume, $dir, $name));

This is no use, it just happens to be lucky and solve a problem, see
above.

> Next problem:
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/tah/batik/ServerMain
> 
> A closer look at the command shows that the classpath separator for 
> windows is wrong. It is separated by semicolon. So another change to 
> BatikAgent.pm
>     push(@cmd, '-classpath', join($^O eq "MSWin32" ? ';':':', 
> $self->find_jars( @{$self->jar_list()} )));

Ah, I forgot about this, sorry. Added to latest revision.

> Now it did launch the BatikAgent sucessfully.
> 
> It would be great if someone could confirm these changes and submit to 
> SVN. Especially the canonpath thing is something I'm not sure about how 
> it will work if java is not included in searchpath.

I've done a few changes now, could you switch to _unstable and test
them before I merge to stable?

-- 
Knut Arne Bjørndal
aka Bob Kåre
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Tilesathome mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/tilesathome

Reply via email to