由于 NoClassDefFoundError 导致无法初始化 twitter4j.TwitterFactory 类
当我从 RMI 调用构建 TwitterFactory
表单 ConfigurationBuilder
时,我知道问题是 NoClassDefFoundError
:
ConfigurationBuilder cb = new ConfigurationBuilder().setHttpProxyHost("58.215.173.23").setHttpProxyPort(8580).setOAuthConsumerKey("18aVBaTUUx5Axh1WgBe7w").setOAuthConsumerSecret("RhE83B9RML060mfMT2FVpD0O6V7wZxZnax1RCA3Y4");
TwitterFactory tf = new TwitterFactory(cb.build());
twitter = tf.getInstance();
但调试器没有告诉我什么类是什么失踪了。我什至无法捕获这个异常,它只是出错了。
我通过在 ConfigurationBuilder cb = new ...
处添加断点来获取这些信息,它
public InvocationTargetException(Throwable target) {
super((Throwable)null); // Here
this.target = target;
}
在 InitationTargetException
类中停止,而且我也无法获取堆栈跟踪。
请帮助我找出可能缺少的内容或我做错了什么。
I know the problem is NoClassDefFoundError
when I build TwitterFactory
form ConfigurationBuilder
like this from RMI call:
ConfigurationBuilder cb = new ConfigurationBuilder().setHttpProxyHost("58.215.173.23").setHttpProxyPort(8580).setOAuthConsumerKey("18aVBaTUUx5Axh1WgBe7w").setOAuthConsumerSecret("RhE83B9RML060mfMT2FVpD0O6V7wZxZnax1RCA3Y4");
TwitterFactory tf = new TwitterFactory(cb.build());
twitter = tf.getInstance();
But the debugger did't tells me what class is missing.I even cannot catch this exception,it just goes wrong.
I got those information by add breakpoint at ConfigurationBuilder cb = new ...
,and it stops at
public InvocationTargetException(Throwable target) {
super((Throwable)null); // Here
this.target = target;
}
in InvocationTargetException
class, and I cannot get stacktrace also.
Please help me to find out what is probably missing or I did something wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论