Open vladak opened 6 years ago
I have a PR queued up: "Refactor AnalyzerGuru, HistoryGuru as non-singleton" (370bfa3c852), that addresses this. It's eighth after the current PR #2017.
Cool, the less singletons the better.
Dne 26. 2. 2018 5:09 odp. napsal uživatel "C Fraire" < notifications@github.com>:
I have a PR queued up: "Refactor AnalyzerGuru, HistoryGuru as non-singleton" (370bfa3 https://github.com/oracle/opengrok/commit/370bfa3c8528ae736e231db81a6bcf39bd424e8b), that addresses this. It's eighth after the current PR #2017 https://github.com/oracle/opengrok/pull/2017.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oracle/opengrok/issues/2027#issuecomment-368554139, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzGDHUIcqDBanI0bi1o6bbkNXfjFdUzks5tYtc6gaJpZM4STegC .
After not using my mac mini workstation (running macOS 10.13.3) for a while to run OpenGrok, I decided to give it a try and do a mini project in Netbeans. To my dismay, the webapp could not be loaded. It deployed fine however then got an exception when rendering the index page:
According to https://stackoverflow.com/questions/7325579/java-lang-noclassdeffounderror-could-not-initialize-class-xxx this is caused by code in the static initializer. Indeed, AnalyzerGuru has lots of stuff that can fail in there. I added try/catch block with logging+rethrow there however could not see it anywhere (like https://stackoverflow.com/questions/19999590/tomcat-6-error-in-static-initialiser-is-hidden-by-noclassdeffounderror?noredirect=1&lq=1).
Next, I constructed trivial test case to call
AnalyzerGuru.getfileTypeDescriptions()
to see if the problem surfaces there however to no avail.Next, I commented out most of the stuff in the
analyzers
array and the problem disappeared however after uncommenting them again I cannot reproduce it anymore so either it is transient or depends on other external factors or there has to be some JVM/Tomcat/Netbeans dance performed to refresh thewar
file (I dutifuly did full rebuild, restart, redeploy each time).