0

我正在使用 Eclipse Kepler javaee 版本。当我尝试创建 HTML 或 JSP 时,它会显示 错误,如果我创建一个文件,它就会被创建。更新eclipse后出现此问题。如何修复此错误?我的日志文件中出现的错误是,

!ENTRY org.eclipse.ui 4 0 2013-10-15 14:48:43.777
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ArrayStoreException
    at java.lang.System.arraycopy(Native Method)
    at java.util.ArrayList.toArray(Unknown Source)
    at org.eclipse.wst.html.ui.internal.wizard.FacetModuleCoreSupportDelegate.getAcceptableRootPaths(FacetModuleCoreSupportDelegate.java:147)
    at org.eclipse.wst.html.ui.internal.wizard.FacetModuleCoreSupport.getAcceptableRootPaths(FacetModuleCoreSupport.java:58)
    at org.eclipse.wst.html.ui.internal.wizard.NewHTMLFileWizardPage.validatePage(NewHTMLFileWizardPage.java:137)
    at org.eclipse.ui.dialogs.WizardNewFileCreationPage.handleEvent(WizardNewFileCreationPage.java:676)
    at org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.handleEvent(ResourceAndContainerGroup.java:367)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2974)
    at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4752)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4614)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
    at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2443)
    at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:260)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4706)
    at org.eclipse.swt.widgets.Text.windowProc(Text.java:2597)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
    at org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method)
    at org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:3473)
    at org.eclipse.swt.widgets.Text.setText(Text.java:2252)
    at org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.setResource(ResourceAndContainerGroup.java:413)
    at org.eclipse.ui.dialogs.WizardNewFileCreationPage.setFileName(WizardNewFileCreationPage.java:754)
    at org.eclipse.wst.html.ui.internal.wizard.NewHTMLFileWizardPage.createControl(NewHTMLFileWizardPage.java:49)
    at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:608)
    at org.eclipse.jface.window.Window.create(Window.java:432)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1104)
    at org.eclipse.ui.internal.navigator.wizards.WizardShortcutAction.run(WizardShortcutAction.java:95)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
4

1 回答 1

0

发生这种情况是因为您在不应包含 JSP 文件的文件夹中创建 JSP。

最可能的原因是,您添加 JSP 文件的文件夹未在 Web 部署程序集中指定。当您右键单击您的项目并选择“属性”时,可以找到 Web 部署程序集。确保指定 WEB-INF 的父文件夹。

我有一次这个错误,我用上面提到的步骤解决了它。

于 2017-10-01T15:34:50.283 回答