JVM tomcat, geoserver JAVA_OPTS

If you have geoserver on you tomcat you all so need to put headless parameter in JAVA_OPTS:

JAVA_OPTS="-Xmx1024m -Xms256m -Djava.awt.headless=true"
Setting this headless system property to true prevent graphics rendering code from assuming that a graphics console exists.

if you don't you probably get this error:
"java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment"

this is a obscure bug concerning X servers and graphics rendering code can cause WMS requests to fail or,
in certain situations, cause Tomcat to crash.


Popular Posts