Friday 21 April 2017

Unable to start weblogic application with stackoverflow error

We have faced an issue where the weblogic managed server comes into RUNNING mode. However, some of the applications targeted to the managed server do not come with the underlying error message in the log files.

<Apr 20, 2017 11:36:04 AM CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "4411720645512325" for task "1". Error is: "weblogic.application.ModuleException: java.lang.StackOverflowError"
weblogic.application.ModuleException: java.lang.StackOverflowError
        at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
        Truncated. see log file for complete stacktrace
Caused By: java.lang.StackOverflowError
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:385)
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:344)
        Truncated. see log file for complete stacktrace

Cause of the issue : 
The issue occurs if the default stack size is not sufficient for your application. We need to increase the stack size to resolve this issue.

Solution : 
Please apply the below solution to resolve the issue :

On the admin console --> Click on Summary of servers --> Click on the server name --> Under Configuration --> Server Start

In the arguments section, please add the below parameter and restart the managed server.

-Xss4096k

This should hopefully resolve the issue.