I checked it again. The class the error thrown is not a static class and the only static block inside this class is a log4j variable.
After one more day testing , I found if one worker runs one task only, this error is seldom thrown . ________________________________ 发件人: Satish Duggana <[email protected]> 发送时间: 2016年7月7日 11:52:11 收件人: [email protected] 主题: Re: NoClassDefFoundError in cluster mode on some executors It may not be because of class is not available on those workers but there may be some race condition in a static block of that class which throws an error. Need more context/info and logs as others suggested. Thanks, Satish. On Thu, Jul 7, 2016 at 8:14 AM, Jungtaek Lim <[email protected]<mailto:[email protected]>> wrote: I guess we need to have context to see what's behind on that. Sharing stack trace might help if you really don't mind. 2016? 7? 7? (?) ?? 11:38, Abhishek Agarwal <[email protected]<mailto:[email protected]>>?? ??: You check what is happening in the Class. There must be some static initialization code which fails. Also note, that whenever an uncaught exception occurs in executor, a jvm shutdown is triggered. This shutdown can also lead to exceptions in static initializations. e.g. https://issues.apache.org/jira/browse/HADOOP-12423 On Thu, Jul 7, 2016 at 7:34 AM, Chen Junfeng <[email protected]<mailto:[email protected]>> wrote: I found “java.lang.NoClassDefFoundError: Could not initialize class ***” error happening in cluster mode incidentally. It is so strange that just some executors of component throw this error while others not. If it is caused by dependency problem in my jar, the entire spout or bolt should not work and offline totally. So what is the reason? My storm version is 1.0.1. Thx a lot. 发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用 -- Regards, Abhishek Agarwal
