[GRASS-user] The tomcat shut down when encounter some error grass commond

maven apache apachemaven0 at gmail.com
Fri Sep 25 01:03:32 EDT 2009


2009/9/23 Sören Gebbert <soerengebbert at gmx.de>

> Hello maven,
> i guess the problem  is located in your GrassMain.java line 200:
>
>                                if (ps.exitValue() != 0) {
>                                        System.exit(ps.exitValue());
>                                }
>
> AFAIK, the tomcat server uses a container to run the several servlet
> threads
> inside.
> If you call from any servlet thread the System.exit() command, the server
> will
> be shutdown.
>
> Java doc of System.exit():
>
Hi,thanks, you are right, I have solved this problem,but I want to know how
to judge a grass commond(called in my javaProgram) is successfully exected?

> Terminates the currently running Java Virtual Machine.
>
> Best regards
> Soeren
>
> Am Sunday 20 September 2009 05:21:29 schrieb maven apache:
>  > Hi,
> > In my application ,I provide a interface which can called by users to
> > execute some geo process through the web,for example,user send a map,and
> a
> > width to the server ,then the server can do a buffer operation using the
> > grass(the server make the grass commond) according to the parameter from
> > client  .
> > But I found that if user give a invalide parameter, then the grass
> commond
> > maybe error, I can get the error message in the log, but my web server
> > (tomcat)shut down itself.
> > Any one have encountered the same suitation?
> >
> > Annex is my java class to set up the grass environment. I  hope some can
> > check it and identify it if any problem exist.
> > The GrassMain is the main class to set up the environment,the GrassThread
> > is to get the output result , the GrassThreadError is to get the error
> > message if so.
> > Thanks!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20090925/f52465a9/attachment.html


More information about the grass-user mailing list