NoSuchMethodError:eclipse中的eclipse.core.runtime.ListenerList错误

时间:2016-10-08 16:55:43

标签: java eclipse

我最近在尝试在Linux中运行的应用程序中遇到此问题。我的jdk是1.8。有人可以建议我如何解决它

以下是完整日志

Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.core.runtime.ListenerList.iterator()Ljava/util/Iterator;
    at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:116)
    at org.eclipse.core.databinding.observable.value.AbstractObservableValue.fireValueChange(AbstractObservableValue.java:82)
    at org.eclipse.core.databinding.observable.value.WritableValue.doSetValue(WritableValue.java:98)
    at org.eclipse.core.databinding.observable.value.AbstractObservableValue.setValue(AbstractObservableValue.java:66)
    at org.eclipse.jface.internal.databinding.viewers.ObservableCollectionContentProvider.setViewer(ObservableCollectionContentProvider.java:167)
    at org.eclipse.jface.internal.databinding.viewers.ObservableCollectionContentProvider.inputChanged(ObservableCollectionContentProvider.java:160)
    at org.eclipse.jface.databinding.viewers.ObservableListContentProvider$Impl.inputChanged(ObservableListContentProvider.java:58)
    at org.eclipse.jface.databinding.viewers.ObservableListContentProvider.inputChanged(ObservableListContentProvider.java:184)
    at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:282)
    at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1696)
    at com.fk.comprende.views.SituationAnalysisComposite.initDataBindings(SituationAnalysisComposite.java:1847)
    at com.fk.comprende.views.SituationAnalysisComposite.<init>(SituationAnalysisComposite.java:1383)
    at com.fk.ComprendeMapper.createContents(ComprendeMapper.java:362)
    at com.fk.ComprendeMapper$1.run(ComprendeMapper.java:70)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at com.fk.ComprendeMapper.open(ComprendeMapper.java:67)
    at com.fk.ComprendeMapper.main(ComprendeMapper.java:55)

1 个答案:

答案 0 :(得分:1)

您使用的org.eclipse.core.runtime插件的版本与您正在使用的JFace数据绑定类不兼容。

Eclipse Neon(4.6)或更高版本中只有org.eclipse.core.runtime版本的ListenerList类具有iterator方法。早期版本的Eclipse具有ListenerList,但它没有您的代码想要使用的iterator方法。