15

OUTLINE

When I want to select the Metadata types for the project, I only get the error:

Unable to open custom component selection dialog. Reason: An unexpected error has occurred.

enter image description here

I don't know if it matters, but I have multiple JDKs and JREs installed.

DETAILS

Just installed eclipse 4.6.2 (fresh, clean, empty) just for the force.com plugin, nothing else:

enter image description here

Installed fresh force.com plugin:

enter image description here

Creating new force.com project with all setting defaul: it works, project there and metadata, too:

enter image description here

Now if I rightclick the project > Force.com > Add/Remove Metadata Components... and in the next Popup I click the button [Add/Remove] like this:

enter image description here

The progressbar advances until nearly it's end and I got these Error popups:

enter image description here

enter image description here

Tried this on a different eclipse version 4.5 and got exactly the same issue. I have multiple JDK, JRE installed.


Error Log 1

eclipse.buildId=4.6.2.M20161124-1400
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

com.salesforce.ide.core
Error
Sat Jan 14 16:44:59 CET 2017
ERROR [2017-01-14 16:44:59,571] (ProjectProjectContentComposite.java:widgetDefaultSelected:296) - Unable to open custom component selection dialog

java.lang.NullPointerException
at com.salesforce.ide.core.internal.utils.PackageManifestDocumentUtils.getPackageNode(PackageManifestDocumentUtils.java:157)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.getComponentTypesFromCache(PackageManifestController.java:1002)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.createModel(PackageManifestController.java:827)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.updateManifest(PackageManifestController.java:174)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.getEnabledCompTypeTreeNodes(PackageManifestController.java:439)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$ManifestContentProvider.getElements(PackageManifestTree.java:690)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1001)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:701)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1349)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:341)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:907)
at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:621)
at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:795)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:596)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:766)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1538)
at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:772)
at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$1(AbstractTreeViewer.java:1523)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1458)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:354)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1419)
at org.eclipse.jface.viewers.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java:409)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$PackageManifestTreeViewer.preservingSelection(PackageManifestTree.java:417)
at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1517)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1696)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree.updateTree(PackageManifestTree.java:1693)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.initialize(ProjectCustomComponentsComposite.java:116)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.<init>(ProjectCustomComponentsComposite.java:72)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.createDialogArea(ProjectCustomComponentsDialog.java:59)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:767)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1095)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.create(ProjectCustomComponentsDialog.java:156)
at org.eclipse.jface.window.Window.open(Window.java:783)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$8.widgetDefaultSelected(ProjectProjectContentComposite.java:294)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$8.widgetSelected(ProjectProjectContentComposite.java:309)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at com.salesforce.ide.ui.handlers.OpenProjectContentPropertiesHandler.execute(OpenProjectContentPropertiesHandler.java:31)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Error Log 2

eclipse.buildId=4.6.2.M20161124-1400
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

com.salesforce.ide.core
Error
Sat Jan 14 16:44:57 CET 2017
ERROR [2017-01-14 16:44:57,117] (PackageManifestController.java:loadAll:502) - Unable to refresh file metadata


java.lang.NullPointerException

at java.lang.String$CaseInsensitiveComparator.compare(String.java:1192)
at java.lang.String$CaseInsensitiveComparator.compare(String.java:1186)
at com.salesforce.ide.core.remote.metadata.FileMetadataExt$1.compare(FileMetadataExt.java:37)
at com.salesforce.ide.core.remote.metadata.FileMetadataExt$1.compare(FileMetadataExt.java:1)
at java.util.TimSort.binarySort(TimSort.java:296)
at java.util.TimSort.sort(TimSort.java:239)
at java.util.Arrays.sort(Arrays.java:1438)
at com.salesforce.ide.core.remote.metadata.FileMetadataExt.sort(FileMetadataExt.java:418)
at com.salesforce.ide.core.remote.metadata.FileMetadataExt.getFilePropertiesMap(FileMetadataExt.java:322)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController$1.run(PackageManifestController.java:298)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:481)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:242)
at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1074)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.updateCache(PackageManifestController.java:295)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.loadAll(PackageManifestController.java:486)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.updateManifest(PackageManifestController.java:173)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.getEnabledCompTypeTreeNodes(PackageManifestController.java:439)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$ManifestContentProvider.getElements(PackageManifestTree.java:690)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1001)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:701)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1349)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:341)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:907)
at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:621)
at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:795)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:596)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:766)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1538)
at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:772)
at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$1(AbstractTreeViewer.java:1523)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1458)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:354)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1419)
at org.eclipse.jface.viewers.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java:409)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$PackageManifestTreeViewer.preservingSelection(PackageManifestTree.java:417)
at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1517)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1696)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree.updateTree(PackageManifestTree.java:1693)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.initialize(ProjectCustomComponentsComposite.java:116)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.<init>(ProjectCustomComponentsComposite.java:72)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.createDialogArea(ProjectCustomComponentsDialog.java:59)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:767)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1095)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.create(ProjectCustomComponentsDialog.java:156)
at org.eclipse.jface.window.Window.open(Window.java:783)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$8.widgetDefaultSelected(ProjectProjectContentComposite.java:294)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$8.widgetSelected(ProjectProjectContentComposite.java:309)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at com.salesforce.ide.ui.handlers.OpenProjectContentPropertiesHandler.execute(OpenProjectContentPropertiesHandler.java:31)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Warning Log (directly before the error)

 eclipse.buildId=4.6.2.M20161124-1400

    java.version=1.8.0_91
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Framework arguments:  -product org.eclipse.epp.package.java.product
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

    com.salesforce.ide.core
    Warning
    Sat Jan 14 17:13:57 CET 2017
     WARN [2017-01-14 17:13:57,929] (Utils.java:loadDocument:807) - Unable to load document: D:\Pool\eclipse-projects\.metadata\.plugins\org.eclipse.core.resources\.projects\heim@xe301.elastify.eu\com.salesforce.ide.core\packageCache.xml (The system cannot find the file specified)
  • 2
    Using Window -> Show View -> Other... -> General -> Error Log in Eclipse will give you a view where the drill-down may offer more detail such as a stack trace that may help. – Keith C Jan 14 '17 at 15:06
  • @KeithC thanks for pointing me there. I added the two error logs. Unfortunately I can't figure what the problem is. – Uwe Heim Jan 14 '17 at 15:53
  • Right off the bat, look at the java.lang.NullPointerException at... in Error Log 1 about 13 lines down. It appears it can't open or parse the manifest package. – crmprogdev Jan 14 '17 at 16:06
  • In the meantime I found, that it's org-specific. On a black empty Org it works. But for nearly all of my used Orgs, it fails. There must be something with a name of a piece of metadata or with an installed package. – Uwe Heim Jan 14 '17 at 16:17
  • I also added an additional warning happening right before the error happens. Its about packageCache.xml – Uwe Heim Jan 14 '17 at 16:21
10

I found a workaround for this issue: Instead of using the UI to Add/Remove Metadata Components you can do that editing the file /src/package.xml

If you use defaults, it looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTestSuite</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>*</members>
        <name>AuraDefinitionBundle</name>
    </types>
    <types>
        <members>*</members>
        <name>StaticResource</name>
    </types>
    <version>38.0</version>
</Package>

Now if you want to add e.g. Flexipages you simply add inside the Package-tag

<types>
    <members>*</members>
    <name>FlexiPage</name> 
</types>

Make sure to "Work online", save the file and "Refresh from Server" and you will get the Flexipages into the UI. If you need other Metadata types, just add them the same way. To figure out the Names, just review : https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_types_list.htm - most of them should work.

Bottom line: for my taste this Workaround is even faster and better than using the UI.

  • Great! Also works for Eclipse 4.7.1a (Oxygen) with a Summer'17 sandbox (version 40). – Sander de Jong Oct 12 '17 at 13:01
  • Sadly this doesn't work for me. I want to add Reports to the list of objects because I need to do a search for a filter occurrence. The report folder just doesn't appear. Does anybody know why? or does anybody have another solution? I had a look at the Project settings again and there it doesn't show up after adding the lines in the package file. I also restarted Eclipse and looked at all the settings files for the project in the workspace with no success. – Roger Wicki Nov 30 '17 at 13:10
  • @VikingWicki this is due to Report folders. Try to add FolderName/* or explicitly state each individual Report path. Spaces and special chars in Folder or name need to be url-encoded. Ask a separate question on how to retrieve Reports via package.xml and/or url-encoding in that context. – Uwe Heim Dec 18 '17 at 13:07
5

Looks like the problem is in Eclipse working with Force.com IDE v38.0. I tried going back to v37.0 and it works fine.

First remove v38.0 (via Help->Installation Details). You can then download version 37.0 from https://developer.salesforce.com/media/force-ide/eclipse45 (uncheck "Show Only Latest Versions").

  • not able to install v37 with eclipse oxygen. It's installing version 38 even though I have asked for version 37. – amidstCloud Aug 7 '17 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.