My Oracle Support Banner

How To Prevent GlassFish Process from Terminating From Application's System.exit() (Doc ID 1924007.1)

Last updated on NOVEMBER 16, 2023

Applies to:

Oracle GlassFish Server - Version 3.1.2 and later
Information in this document applies to any platform.

Goal

Sometimes there may be some components or user application code that may call System.exit() when some conditions are encountered. When System.exit() is called, the whole GlassFish process will exit and terminate without much indication why it abruptly stopped. In fact, it may even have some symptoms like <Note: 1340203.1> Oracle GlassFish Server Process Terminates or Disappears For No Apparent Reason.

If the JVM has -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:+LogFile=${com.sun.aas.instanceRoot}/logs/jvm.log enabled, like what is done in GlassFish 2.x where the jvm.log dumps some JVM diagnostic logs, one may get some indication if this JVM crashed or somehow terminated.

This purpose of this article is to address the issue wherein there is an application or component code doing System.exit() from withing their code, that may cause the JVM to exit.

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.