You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Botong Huang (JIRA)" <ji...@apache.org> on 2017/03/28 15:22:41 UTC

[jira] [Created] (YARN-6404) Avoid misleading NoClassDefFoundError caused by ExceptionInInitializerError in FederationStateStoreFacade

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: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org