1

我代表30 个左右的项目发布这个问题,这些项目似乎正在遭受这个问题的困扰,但没有任何解决方案。

基本上问题归结为 org.eclipse.jdt.internal.ui.wizards.NewElementWizard 的子类(它是控制创建新 JDT 元素(如项目、包、类等)的“向导”)——这个问题无论您出于什么原因进行子类化似乎都会发生)重载 performFinish() 并调用 super.performFinish() 作为该调用的一部分。到目前为止一切顺利,但由于某种原因,如果这种情况发生在空工作区(新项目通常是这种情况),则 super.performFinish() 调用将失败,并出现类似于以下的异常:

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:350)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:851)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish(NewElementWizard.java:133)
at com.canoo.wizard.newproject.NewULCProjectWizard.performFinish(NewULCProjectWizard.java:118)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355)
at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

或类似的东西——这个错误在我在谷歌搜索这个错误的过程中发现的几十个不同项目中非常相似,无论 NewItemWizard 的子类是否恰好是一个项目向导,一个类向导, 任何。

一些报告这个问题的人后来发布了它是由“版本不匹配”引起的,但令人抓狂的是,他们从来没有提供任何关于哪些版本与什么不匹配的细节——我已经在 Linux、Windows、和 OS X,所以我怀疑这是一些非常特定于版本或平台的细微差别。

最后,Eclipse bugzilla 中似乎没有任何与此问题相关的内容。

有没有人遇到过这个,因为它似乎无处不在?任何帮助将不胜感激!

4

1 回答 1

1

InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor

Every case I have found report some kind of incompatibility between Eclipse and a module:

In other words, this kind of exception is often the symptom of another issue.
The enum issue is a good example of such an incompatibility, but each time it can be a different problem related to the specific operations or configurations of the project.

于 2010-01-25T14:29:12.743 回答