You are currently reviewing an older revision of this page.

[DRAFT] - KB-XXXX StackOverflowError thrown upon WebLogic startup

Symptoms

WebLogic gets stuck on startup and prints the following errors in the application server log:

Error creating bean with name 'smartServiceBridgeRegistry' defined in class path resource [com/appiancorp/expr/server/reaction/ReactionSpringConfig.class]: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.appiancorp.core.expr.reaction.ReactionFunctionProvider]: : 
Error creating bean with name 'reactionFunctionProvider' defined in class path resource [com/appiancorp/expr/server/reaction/ReactionSpringConfig.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.List]: :
Error creating bean with name 'importReaction' defined in class path resource [com/appiancorp/object/action/ObjectActionSpringConfig.class]: Unsatisfied dependency expressed through constructor argument with index 4 of type [com.appiancorp.ix.activity.IxActivityService]: :
Error creating bean with name 'ixActivityService' defined in class path resource [com/appiancorp/ix/spring/IxActivitySpringConfig.class]: Unsatisfied dependency expressed through constructor argument with index 4 of type [com.appiancorp.type.config.plugin.PojoDatatypesConfig]: :
Error creating bean with name 'pojoDatatypesConfig' defined in class path resource [com/appiancorp/type/TypeSpringConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.appiancorp.type.config.plugin.PojoDatatypesConfig]: Factory method 'pojoDatatypesConfig' threw exception; nested exception is java.lang.StackOverflowError

Cause

StackOverflow errors are usually caused by unterminated recursion, where the same errors are being repeated over and over again. This can happen if the JVM stack is too small.

Action

Increase the JVM stack size. Set -Xss or -XX:ThreadStackSize to a 4 Megabytes. 

  1. Go to <WEBLOGIC_HOME>/<project_name>/domains/<domain_name>/bin/setDomainEnv.sh (make the corresponding change to setDomainEnv.cmd if on Windows).
  2. Set the JAVA_OPTIONS="..-Xss4m.."

For example:

JAVA_OPTIONS="-Duser.timezone=GMT -Dfile.encoding=UTF-8 -Djavax.xml.soap.MessageFactory=weblogic.xml.saaj.MessageFactoryImpl -Djava.awt.headless=true -Xms512m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -Dweblogic.log.RedirectStdoutToServerLogEnabled=true -Dweblogic.log.RedirectStderrToServerLogEnabled=true -Xss4m ${JAVA_OPTIONS}"

If stack overflow errors are still present with the JVM stack at 4MB it is likely another issue. Examine the stack trace to get insight on why long stack traces are being printed (usually something in the environment is looping). If the issue goes away, reduce the JVM stack as much as you can without triggering the error. In previous tests, 512K has been seen to be optimum. However, every environment is unique and extensive testing is recommended before pushing any changes to production.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: January 2018