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

Sören Gebbert soerengebbert at gmx.de
Tue Sep 22 16:51:36 EDT 2009


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(): 
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!




More information about the grass-user mailing list