Geoserver does not start on tomcat 8 in linux environment. Spring bean creation of gml32FeatureTypeEncoder fires java.lang.StackOverflowError

Description

After running the application server, tomcat fails to initalize the 'geosever' context.
All log files are in the attachment.
The error is :
26 Jul 13:40:35 ERROR [context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gml32FeatureTypeEncoder' defined in URL [jar:file:/home/tomcat/apache-tomcat-8.5.4/webapps/geoserver/WEB-INF/lib/gs-wfs-2.9.0.jar!/applicationContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder$V20]: Constructor threw exception; nested exception is java.lang.StackOverflowError
....

Environment

OS:
Oracle Linux Server release 7.2
--------------------------------------------------------------------------
GDAL:
gdal.x86_64 - 1.11.4-1.el7
gdal-java.x86_64 - 1.11.4-1.el7
---------------------------------------------------------------------------
JAVA:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
JAI installed as it is described in documentation: http://docs.geoserver.org/stable/en/user/production/java.html
----------------------------------------------------------------------------
TOMCAT - tested with these versions:
apache-tomcat-7.0.70 - with java version 1.7
apache-tomcat-8.0.36
apache-tomcat-8.5.4
the content of used setenv.sh is:
#! /bin/sh
export CATALINA_OPTS="$CATALINA_OPTS -Xms512m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx4512m"
export CATALINA_OPTS="$CATALINA_OPTS -Xss256k"
export CATALINA_OPTS="$CATALINA_OPTS -XX:SoftRefLRUPolicyMSPerMB=36000"
export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseG1GC"
export CATALINA_OPTS="$CATALINA_OPTS -server"
----------------------------------------------------------------------------
"data" folder is moved from <home>/<tomcat>/webapps/geoserver to <home>/geoserver_data
and GEOSERVER_DATA_DIR environment variable is created in .bash_profile file:
export JAVA_HOME=/usr/java/jdk1.8.0_91/
export GEOSERVER_DATA_DIR=/home/tomcat/geoserver_data
export GDAL_DATA=/usr/share/gdal
----------------------------------------------------------------------------
LIBRARIES:
jai_codec-1.1.3.jar, jai_core-1.1.3.jar, jai_imageio-1.1.jar
are removed from /<home>/<tomcat>/webapps/geoserver/WEB-INF/lib/
postgresql-9.4-1201-jdbc41.jar is moved from /<home>/<tomcat>/webapps/geoserver/WEB-INF/lib/ to /<home>/<tomcat>/lib/

Assignee

Unassigned

Reporter

Petyo Zafirov

Triage

None

Fix versions

None

Affects versions

Components

Priority

High
Configure