gpt4 book ai didi

java - eclipse : adding JSF 2 facet results in NullpointerException

转载 作者:行者123 更新时间:2023-12-04 06:37:12 27 4
gpt4 key购买 nike

我有一个 maven 项目,然后,我想在项目中启用 JSF 2 facet,因为我意识到在编辑我的 jsf 时,我无法使用 jsf/primefaces 标签和带有 ctrl 空格的标签属性进行自动完成页。

在我的 Helios eclipse 中启用 JSF 2 方面会导致 NullPointerException,并带有以下完整的异常跟踪:

!ENTRY org.eclipse.wst.common.project.facet.core 4 0 2011-01-18 22:45:17.073
!MESSAGE null
!STACK 0
java.lang.NullPointerException
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider.validateConfigLocation(JSFFacetInstallDataModelProvider.java:232)
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider.validate(JSFFacetInstallDataModelProvider.java:161)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelImpl.validate(DataModelImpl.java:377)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelImpl.validate(DataModelImpl.java:358)
at org.eclipse.wst.common.componentcore.datamodel.FacetDataModelConfigAdapter.validate(FacetDataModelConfigAdapter.java:63)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.updateFurtherConfigHyperlink(FacetsPropertyPage.java:422)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.access$4(FacetsPropertyPage.java:337)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$6.run(FacetsPropertyPage.java:330)
at org.eclipse.wst.common.project.facet.ui.internal.util.SwtUtil.runOnDisplayThread(SwtUtil.java:34)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.handleProjectModifiedEvent(FacetsPropertyPage.java:334)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.access$2(FacetsPropertyPage.java:324)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$3.handleEvent(FacetsPropertyPage.java:189)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.notifyListeners(FacetedProjectWorkingCopy.java:1752)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.resumeEventNotification(FacetedProjectWorkingCopy.java:1797)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.addProjectFacet(FacetedProjectWorkingCopy.java:822)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsSelectionPanel.handleCheckStateChanged(FacetsSelectionPanel.java:758)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsSelectionPanel.access$10(FacetsSelectionPanel.java:729)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsSelectionPanel$6.checkStateChanged(FacetsSelectionPanel.java:309)
at org.eclipse.jface.viewers.CheckboxTreeViewer$1.run(CheckboxTreeViewer.java:166)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.CheckboxTreeViewer.fireCheckStateChanged(CheckboxTreeViewer.java:164)
at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect(CheckboxTreeViewer.java:300)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1220)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:228)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:222)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:389)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
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:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

!ENTRY org.eclipse.wst.common.project.facet.core 4 0 2011-01-18 22:45:18.622
!MESSAGE Failed while installing JavaServer Faces 2.0.
!STACK 0
java.lang.NullPointerException
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate.resolveConfigPath(JSFFacetInstallDelegate.java:296)
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate.createConfigFile(JSFFacetInstallDelegate.java:313)
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate.execute(JSFFacetInstallDelegate.java:124)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1478)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:442)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1182)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1118)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.run(FacetedProject.java:1100)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1110)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$4.run(FacetsPropertyPage.java:232)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$5.run(FacetsPropertyPage.java:246)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

这里可能有什么问题..或..

也许还有其他方法可以启用自动完成,而无需在 Eclipse Helios 中添加动态 Web 模块和 jsf 2 方面?

最佳答案

我自己找到了解决方案/解决方法。我只是删除了项目,将其重新导入为 maven 项目,添加了方面,最后一切都很好。

谢谢!现在很开心。希望这也可以帮助其他人。

关于java - eclipse : adding JSF 2 facet results in NullpointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4726064/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com