Deployment Assembly: The currently displayed page

2020-06-09 06:19发布

问题:

I imported a Java Web application from Sourceforge, and I did three working weeks efforts to get rid off all red crosses attached to the project name and packages, but now I couldn't make the application run on my Eclipse & tomcat6 developing environment. In project properties when I tried to set the Deployment Assembly, the dialog box showed: the currently displayed page contains invalid values. And in the error log, I found when I click the Deployment Assembly, The following error message was showed:

Error


Wed Jan 09 10:25:16 CST 2013
Problems occurred when invoking code from plug-in: "org.eclipse.jface".

java.lang.NullPointerException
    at org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder.getFirstTaggedResource(VirtualFolder.java:185)
    at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getDefaultDeploymentDescriptorFolder(J2EEModuleVirtualComponent.java:542)
    at org.eclipse.jst.j2ee.internal.ui.JavaEEDeploymentAssemblyAdvancedSectionBuilder.(JavaEEDeploymentAssemblyAdvancedSectionBuilder.java:86)
    at org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage.getAdvancedSectionBuilder(J2EEModuleDependenciesPropertyPage.java:381)
    at org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage.(J2EEModuleDependenciesPropertyPage.java:65)
    at org.eclipse.jst.servlet.ui.internal.WebDependencyPropertyPage.(WebDependencyPropertyPage.java:34)
    at org.eclipse.jst.servlet.ui.internal.WebModuleDependencyPageProvider.createPages(WebModuleDependencyPageProvider.java:54)
    at org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage.createContents(ModuleAssemblyRootPage.java:195)
    at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232)
    at org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage.createControl(ModuleAssemblyRootPage.java:346)
    at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1502)
    at org.eclipse.jface.preference.PreferenceDialog$14.run(PreferenceDialog.java:1259)
    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.preference.PreferenceDialog.showPage(PreferenceDialog.java:1253)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:675)
    at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:709)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:705)
    at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
    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.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886)
    at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1226)
    at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1251)
    at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:262)
    at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:256)
    at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:433)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    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:158)
    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:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    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:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

I googled many times , but I cannot find the solutions. Can anyone give a favor to let the Deployment Assembly work? I think this is the key why my app cannot run. Thanks in advance.

回答1:

eclipse -clean didn't fix it for me. My workaround: In eclipse delete the project (don't delete on disk). Then in the filesystem delete .project .classpath and .settings/* Then in eclipse, same workspace, create new webproject with same name as the old one. It created the project and found all my source. Now Deployment Assembly works again! After that, I updated build path to have the proper project and lib dependencies.



回答2:

Please look at this answer. If clean won't help, then probably something is wrong with your project's specific settings. I would suggest you to examine every file inside .settings/ directory.

I know this is not a ready-to-go solution, but may be at least a starting point.



回答3:

I experienced this issue as well. It was caused by me deleting another project on which my current project was dependent. I fixed the issue by opening the file org.eclipse.wst.common.component in the .settings folder and deleting the dependency. This fixed the issues and I was able to edit the deployment assembly.

Section I removed: (utility.jar is the name of my offending jar)

   <dependent-module archiveName="utility.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/utility/utility">
        <dependency-type>uses</dependency-type>
    </dependent-module>

Someone else I work with was able to fix it by deleting the jar from their build path.

Hope this helps anyone that hits this issue.



回答4:

Delete .project .classpath and .settings then cleate a new(temporally) workspace import your project in the new workspace, this will generate new .project .classpath and .settings files. Then open the old workspace again and issue is fixed. You can delete the temporally workspace if you don't need it



回答5:

Please check this file ".settings/org.eclipse.wst.common.component" under .settings folder which maps to the deployment assembly in the UI.Please check "wb-module" tag and clean up the wb-resource items inside it if present.

This file will be visible in navigator view in eclipse



回答6:

I ran into the same state in different situation after adding a Source (a folder) and trying to modify the Deploy Path. So, got the same error message: Deployment Assembly: The currently displayed page contains invalid values. Unfortunately the ideas above did not help and many seemed to suggest bigger delete/re-install operations to a seemingly small config issue.

Unfortunately, at the given error state Eclipse (Version: Mars.2 Release (4.5.2)) did not allow go use GUI to correct things... so what I did next.

I found out that the entries tagged: <wb-resource .... /> in the xml-file org.eclipse.wst.common.component in {workspace}/{project}/.settings -folder had incomplete entry of wb-resources. I needed to have something like this included in there:

<wb-resource deploy-path="/" source-path="/web" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>

The wegb-row was incomplete and src-containing-row was missing completely. This file/location has been targeted and identified to be potentially corrupt/invalid also in earlier answers. Fixing this file did not let me get GUI work, yet. Next I had to delete couple of rows from a plugin history.

In {workspace}/.metadata/.plugins/org.eclipse.core.resources/.history -folder I located the newest folders and deleted folders that contained the changes related to Deployment Assembly.

After this restarted Eclipse and I could use the GUI for configurations again! I did no need to delete/re-install project (I wanted to avoid re-installing project due to lots of configuration). I hope this helps someone else running into the same error message.



回答7:

I suffered the same problem, and I realized it started just after I installed into my Neon.1a Eclipse a certain old plugin, aimed to versions 3.x.

So I uninstalled that plugin, and the problem dissapeared without changing my workspace in any.

(Just to complete the information, I'll say that the "culprit" was the Randalco EHP plugin, but I suppose any old version plugin might be suspicious too).