Botong Huang created YARN-6404:
----------------------------------
Summary: Avoid misleading NoClassDefFoundError caused by
ExceptionInInitializerError in FederationStateStoreFacade
Key: YARN-6404
URL: https://issues.apache.org/jira/browse/YARN-6404
Project: Hadoop YARN
Issue Type: Bug
Reporter: Botong Huang
Assignee: Botong Huang
Priority: Minor
Currently the singleton is created in static block:
private static final FederationStateStoreFacade FACADE =
new FederationStateStoreFacade();
If the constructor method fails and throw, we will see the full exception stack
for the first time, wrapped into an {{ExceptionInInitializerError}}. However,
after that, all later hits will be prevented by JVM, throwing a misleading
{{NoClassDefFoundError}}.
Here's more explanation from Stack Overflow:
http://stackoverflow.com/questions/34413/why-am-i-getting-a-noclassdeffounderror-in-java
The earlier failure could be a ClassNotFoundException or an
ExceptionInInitializerError (indicating a failure in the static initialization
block) or any number of other problems. The point is, a NoClassDefFoundError is
not necessarily a classpath problem.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]