eclipse-equinox / equinox.bundles

Eclipse Public License 2.0
8 stars 16 forks source link

java.lang.IllegalArgumentException: Declaration is invalid in recent builds #33

Closed vogella closed 2 years ago

vogella commented 2 years ago

At startup in the latest build I see the follow error:

@tjwatson and @HannesWell maybe related to your recent work?

java.lang.IllegalArgumentException: Declaration is invalid: osgi.native; eclipse.product="org.eclipse.sdk.ide"; osgi.nl="de_DE"; osgi.framework.useSystemProperties="true"; osgi.instance.area.default="file:/C:/Users/vogella/workspace/"; ds.delayed.keepInstances.default="true"; osgi.bundles="reference:file:org.eclipse.equinox.simpleconfigurator_1.4.0.v20210315-2228.jar@1:start"; osgi.native.osversion:Version="10.0.0"; osgi.native.osname:List="Windows10,Windows 10,Win10,Win32"; eclipse.p2.profile="SDKProfile"; org.osgi.framework.processor="x86-64"; osgi.framework="file:/c:/Users/vogella/Downloads/eclipse-SDK-I20220424-1800-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.18.0.v20220426-2016.jar"; osgi.framework.extensions="reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar"; osgi.os="win32"; org.osgi.framework.os.name="Windows10"; osgi.splashPath="platform:/base/plugins/org.eclipse.platform"; osgi.arch="x86_64"; osgi.ws="win32"; osgi.instance.area="C:\Users\vogella\workspace\eclipse\"; org.eclipse.equinox.simpleconfigurator.configUrl="file:org.eclipse.equinox.simpleconfigurator/bundles.info"; osgi.bundles.defaultStartLevel="4"; org.osgi.framework.language="de"; osgi.native.processor:List="x86-64,amd64,em64t,x86_64"; eclipse.application="org.eclipse.ui.ide.workbench"; org.osgi.framework.os.version="10.0.0"; osgi.compatibility.bootdelegation.default="true"; eclipse.p2.data.area="@config.dir/../p2/"; eclipse.buildId="4.24.0.I20220427-0410"; osgi.native.language="de" at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createGenericDescriptions(StateObjectFactoryImpl.java:582) at org.eclipse.osgi.compatibility.state.StateConverter.createProvideCapability(StateConverter.java:116) at org.eclipse.osgi.compatibility.state.StateConverter.createDescription(StateConverter.java:67) at org.eclipse.osgi.compatibility.state.PlatformAdminImpl.createSystemState(PlatformAdminImpl.java:107) at org.eclipse.osgi.compatibility.state.PlatformAdminImpl.getSystemState(PlatformAdminImpl.java:85) at org.eclipse.osgi.compatibility.state.ReadOnlyState.getBundle(ReadOnlyState.java:41) at org.eclipse.pde.internal.runtime.registry.model.LocalRegistryBackend.getIsEnabled(LocalRegistryBackend.java:291) at org.eclipse.pde.internal.runtime.registry.model.LocalRegistryBackend.createBundleAdapter(LocalRegistryBackend.java:155) at org.eclipse.pde.internal.runtime.registry.model.LocalRegistryBackend.bundleChanged(LocalRegistryBackend.java:399) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) Caused by: org.osgi.framework.BundleException: Invalid manifest header Provide-Capability: "osgi.native; eclipse.product="org.eclipse.sdk.ide"; osgi.nl="de_DE"; osgi.framework.useSystemProperties="true"; osgi.instance.area.default="file:/C:/Users/vogella/workspace/"; ds.delayed.keepInstances.default="true"; osgi.bundles="reference:file:org.eclipse.equinox.simpleconfigurator_1.4.0.v20210315-2228.jar@1:start"; osgi.native.osversion:Version="10.0.0"; osgi.native.osname:List="Windows10,Windows 10,Win10,Win32"; eclipse.p2.profile="SDKProfile"; org.osgi.framework.processor="x86-64"; osgi.framework="file:/c:/Users/vogella/Downloads/eclipse-SDK-I20220424-1800-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.18.0.v20220426-2016.jar"; osgi.framework.extensions="reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar"; osgi.os="win32"; org.osgi.framework.os.name="Windows10"; osgi.splashPath="platform:/base/plugins/org.eclipse.platform"; osgi.arch="x86_64"; osgi.ws="win32"; osgi.instance.area="C:\Users\vogella\workspace\eclipse\"; org.eclipse.equinox.simpleconfigurator.configUrl="file:org.eclipse.equinox.simpleconfigurator/bundles.info"; osgi.bundles.defaultStartLevel="4"; org.osgi.framework.language="de"; osgi.native.processor:List="x86-64,amd64,em64t,x86_64"; eclipse.application="org.eclipse.ui.ide.workbench"; org.osgi.framework.os.version="10.0.0"; osgi.compatibility.bootdelegation.default="true"; eclipse.p2.data.area="@config.dir/../p2/"; eclipse.buildId="4.24.0.I20220427-0410"; osgi.native.language="de"" at org.eclipse.osgi.util.ManifestElement.parseHeader(ManifestElement.java:444) at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createGenericDescriptions(StateObjectFactoryImpl.java:577) ... 11 more

tjwatson commented 2 years ago

Is this when you start Eclipse for your workspace, or is it starting an eclipse instance from your running Eclipse workspace (self-hosting)?

HannesWell commented 2 years ago

To me it looks like this is the relevant part (I really don't understand why Java's Throwable.printStacktrace() prints the very first exception at the bottom. That's usually the cause and therefore the most interesting part):

Caused by: org.osgi.framework.BundleException: Invalid manifest header Provide-Capability: "osgi.native; eclipse.product="org.eclipse.sdk.ide"; osgi.nl="de_DE"; osgi.framework.useSystemProperties="true"; osgi.instance.area.default="file:/C:/Users/vogella/workspace/"; ds.delayed.keepInstances.default="true"; osgi.bundles="reference:file:org.eclipse.equinox.simpleconfigurator_1.4.0.v20210315-2228.jar@1:start"; osgi.native.osversion:Version="10.0.0"; osgi.native.osname:List="Windows10,Windows 10,Win10,Win32"; eclipse.p2.profile="SDKProfile"; org.osgi.framework.processor="x86-64"; osgi.framework="file:/c:/Users/vogella/Downloads/eclipse-SDK-I20220424-1800-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.18.0.v20220426-2016.jar"; osgi.framework.extensions="reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar"; osgi.os="win32"; org.osgi.framework.os.name="Windows10"; osgi.splashPath="platform:/base/plugins/org.eclipse.platform"; osgi.arch="x86_64"; osgi.ws="win32"; osgi.instance.area="C:\Users\vogella\workspace\eclipse"; org.eclipse.equinox.simpleconfigurator.configUrl="file:org.eclipse.equinox.simpleconfigurator/bundles.info"; osgi.bundles.defaultStartLevel="4"; org.osgi.framework.language="de"; osgi.native.processor:List="x86-64,amd64,em64t,x86_64"; eclipse.application="org.eclipse.ui.ide.workbench"; org.osgi.framework.os.version="10.0.0"; osgi.compatibility.bootdelegation.default="true"; eclipse.p2.data.area="@config.dir/../p2/"; eclipse.buildId="4.24.0.I20220427-0410"; osgi.native.language="de""
at org.eclipse.osgi.util.ManifestElement.parseHeader(ManifestElement.java:444)

It looks like the manifest is somehow invalid. I would be supprised if this this is due to the latest change, but it would not be the first time. But didn't have somebody, maybe it was even you, a similar exception a few months ago? I don't remember exactly anymore. Anyway, maybe you can place a break-point at org.eclipse.osgi.util.ManifestElement.parseHeader(ManifestElement.java:444) to gather some more information.

tjwatson commented 2 years ago

I also don't understand why this is happening and cannot reproduce it. I even took the string and tried passing it to ManifestElement.parseHeader and it works fine:

    public static void main(String[] args) throws BundleException {
        System.out.println(ManifestElement.parseHeader("Provide-Capability", "osgi.native; eclipse.product=\"org.eclipse.sdk.ide\"; osgi.nl=\"de_DE\"; osgi.framework.useSystemProperties=\"true\"; osgi.instance.area.default=\"file:/C:/Users/vogella/workspace/\"; ds.delayed.keepInstances.default=\"true\"; osgi.bundles=\"reference:file:org.eclipse.equinox.simpleconfigurator_1.4.0.v20210315-2228.jar@1:start\"; osgi.native.osversion:Version=\"10.0.0\"; osgi.native.osname:List=\"Windows10,Windows 10,Win10,Win32\"; eclipse.p2.profile=\"SDKProfile\"; org.osgi.framework.processor=\"x86-64\"; osgi.framework=\"file:/c:/Users/vogella/Downloads/eclipse-SDK-I20220424-1800-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.18.0.v20220426-2016.jar\"; osgi.framework.extensions=\"reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar\"; osgi.os=\"win32\"; org.osgi.framework.os.name=\"Windows10\"; osgi.splashPath=\"platform:/base/plugins/org.eclipse.platform\"; osgi.arch=\"x86_64\"; osgi.ws=\"win32\"; osgi.instance.area=\"C:\\Users\\vogella\\workspace\\eclipse\"; org.eclipse.equinox.simpleconfigurator.configUrl=\"file:org.eclipse.equinox.simpleconfigurator/bundles.info\"; osgi.bundles.defaultStartLevel=\"4\"; org.osgi.framework.language=\"de\"; osgi.native.processor:List=\"x86-64,amd64,em64t,x86_64\"; eclipse.application=\"org.eclipse.ui.ide.workbench\"; org.osgi.framework.os.version=\"10.0.0\"; osgi.compatibility.bootdelegation.default=\"true\"; eclipse.p2.data.area=\"@config.dir/../p2/\"; eclipse.buildId=\"4.24.0.I20220427-0410\"; osgi.native.language=\"de\""));
    }
vogella commented 2 years ago

I cannot reproduce anymore. This was in a regular IDE not a runtime IDE: