Resolution: Description:
============
Error message "Caused by: java.lang.StackOverflowError" "org.slf4j.impl.JCLLoggerFactory.getLogger(JCLLoggerFactory.java:69)" in console output during hawkagent startup. hawkagent crashes.
Symptoms:
========
The following error message in console output:
Caused by: java.lang.StackOverflowError
at java.util.HashMap.getEntry(Unknown Source)
at java.util.HashMap.get(Unknown Source)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:153)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:289)
at org.slf4j.impl.JCLLoggerFactory.getLogger(JCLLoggerFactory.java:69)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:161)
...
Cause:
=====
The purpose of the slf4j-jcl module is to delegate or redirect calls made to an SLF4J logger to Jakarta commons logging (JCL). The purpose of the jcl-over-slf4j module is to redirect calls made to a JCL logger to SLF4J. If both slf4j-jcl.jar and jcl-over-slf4j.jar are present in the class path, then a StackOverflowError will occur immediately after the first invocation of an SLF4J or a JCL logger. jcl-over-slf4j.jar should be the one bundled with the Hawk installation and slf4j-jcl.jar is installed by another (yet unknown) installation.
Resolution:
==========
Use "./hawkagent --debug >debug.output" or "hawkagent.exe --debug >debug.output" to start hawkagent and see if there is any slf4j-jcl***.jar and jcl-over-slf4j***.jar in the debug.output.
Backup and remove this slf4j-jcl***.jar from <hawk>/lib/ or remove it from the classpath of hawkagent. Start hawkagent again.
References:
==========
http://www.slf4j.org/codes.html#log4jDelegationLoop