4

When running my eclipse e4 application it shows that problems have been detected when validating.

Missing Constraint

This can be fixed by going to run configurations and selecting Add Required Plug-ins but this is more of a work around then a fix.

I've tried changing the versions and adding/removing plugins but can't figure out how to solve these errors.

A similar issue is mentioned here.

What could be causing this?

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25
Michael
  • 3,411
  • 4
  • 25
  • 56
  • Why is 'adding required plug-ins 'just' a workaround? You need to have the correct plugins before things will work. The set of required plugins does vary between Eclipse releases, in this case it is the addition of org.apache.felix.scr that causes the issue. – greg-449 Feb 20 '19 at 10:07
  • The application should be set up so the developers don't have to do anything else to get it working. I've tried `Add Required Plug-ins` in the product file but that doesn't add all of them. In the run configuration it adds everything that is needed though. Also when we build the app it will use the information from the manifest etc and not the `Run Configuration` so that would be a problem too? – Michael Feb 20 '19 at 10:13
  • What version of Eclipse are you using? What version of Eclipse is your target platform? – greg-449 Feb 20 '19 at 10:15
  • 2018-12 and the target platform is set to the `Running Platform`. – Michael Feb 20 '19 at 10:21
  • Not a direct solution but I find it much easier to use 'feature' based configuration both in the product file and the Run Configuration. The feature contents determine the plugins and should always be correct. – greg-449 Feb 20 '19 at 10:35
  • Do you know what is the cause of the current error? – Michael Feb 20 '19 at 12:15
  • The org.apache.felix.scr plugin provides the capability being complained about. This is a change from older releases which used a different plugin, and also requires changes to the start levels if the default is not being used. I don't know why Eclipse is not including this for you. – greg-449 Feb 20 '19 at 12:38
  • I've added the `org.apache.felix.scr` plugin and this has removed the previous problems. Instead of `osgi.extender` it now is complaining about `osgi.service`. This is for `org.eclipse.e4.ui.services` and `org.eclipse.e4.ui.workbench`. – Michael Feb 20 '19 at 12:54

2 Answers2

8

If you add org.eclipse.equinox.ds to your Required Plug-ins in MANIFEST.MF then this dialog will not show up at launch.

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25
  • There isn't one available for `org.eclipse.equinox.ds`. There are multiple entries for `org.eclipse.equinox.*` but not `ds`. – Michael Feb 20 '19 at 14:56
  • Wow, they took it out. Kenneth Evans writes it is "in the 4.10 update site under Equinox Target Components" in this thread: https://bugs.eclipse.org/bugs/show_bug.cgi?id=539655 – Adam Horvath Feb 20 '19 at 15:09
  • This is almost it! I installed the `Equinox Target Components` then added `org.eclipse.equinox.ds` to the manifest. After adding required plugins it adds the `org.apache.felix.scr` plugin which fixes the problem as it is a dependency. Overall this can be avoided by adding `org.apache.felix.scr` without doing anything else but I end up with missing constraints as mentioned in the comments with Greg above. I get missing constraints for `osgi.service`. This is for `org.eclipse.e4.ui.services` and `org.eclipse.e4.ui.workbench`. Do you know what might cause this? – Michael Feb 20 '19 at 15:33
  • 1
    `org.eclipse.equinox.ds` is no longer used in the latest versions of Eclipse. It has been replaced with `org.apache.felix.scr` – greg-449 Feb 21 '19 at 07:55
  • That makes sense. Do you have any ideas for the next error I'm getting? I can create a separate question if that's easier. I'm having trouble fixing these errors as I'm not sure where to look so if you have any documents I should check out it would be great. – Michael Feb 21 '19 at 08:56
6

I managed to find the missing plugins by comparing my run configuration before and after clicking Add Required Plug-ins.

There were 5 plugins missing that clicking Add Required Plug-ins in the product file didn't add.

org.apache.felix.scr
org.eclipse.equinox.event
org.eclipse.compare.core
org.eclipse.fx.osgi
org.eclipse.team.core

After adding these plug-ins to the product file and manifest the missing constraints problem was resolved.

Michael
  • 3,411
  • 4
  • 25
  • 56