List of usage examples for java.lang NoClassDefFoundError setStackTrace
public void setStackTrace(StackTraceElement[] stackTrace)
From source file:org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.java
@VisibleForTesting org.apache.hadoop.security.token.Token<TimelineDelegationTokenIdentifier> getTimelineDelegationToken() throws IOException, YarnException { try {//from w ww.j av a2 s .c om // Only reachable when both security and timeline service are enabled. if (timelineClient == null) { synchronized (this) { if (timelineClient == null) { timelineClient = createTimelineClient(); timelineClient.init(getConfig()); timelineClient.start(); } } } return timelineClient.getDelegationToken(timelineDTRenewer); } catch (Exception e) { if (timelineServiceBestEffort) { LOG.warn("Failed to get delegation token from the timeline server: " + e.getMessage()); return null; } throw e; } catch (NoClassDefFoundError e) { NoClassDefFoundError wrappedError = new NoClassDefFoundError( e.getMessage() + ". It appears that the timeline client " + "failed to initiate because an incompatible dependency " + "in classpath. If timeline service is optional to this " + "client, try to work around by setting " + YarnConfiguration.TIMELINE_SERVICE_ENABLED + " to false in client configuration."); wrappedError.setStackTrace(e.getStackTrace()); throw wrappedError; } }