We develop a Eclipse RCP app using the Eclipse IDE. There is a Target Platform that we use (xml below) that causes errors for me -- everybody else seems to be fine.
A pop up opens and there are hundreds or thousands of the same errors:
An internal error occurred during: "RCP Target" target definition". java.lang.IllegalArgumentException
The error log reveals the stacktrace:
java.lang.IllegalArgumentException
at org.eclipse.equinox.internal.p2.metadata.VersionParser.parse(VersionParser.java:83)
at org.eclipse.equinox.p2.metadata.Version.create(Version.java:96)
at org.eclipse.equinox.p2.metadata.Version.parseVersion(Version.java:164)
at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.createBundleArtifactKey(BundlesAction.java:157)
at org.eclipse.pde.internal.core.target.VirtualArtifactRepository.<init>(VirtualArtifactRepository.java:91)
at org.eclipse.pde.internal.core.target.P2TargetUtils.addAdditionalProvisionIUs(P2TargetUtils.java:1667)
at org.eclipse.pde.internal.core.target.P2TargetUtils.resolveWithPlanner(P2TargetUtils.java:1125)
at org.eclipse.pde.internal.core.target.P2TargetUtils.synchronize(P2TargetUtils.java:822)
at org.eclipse.pde.internal.core.target.TargetDefinition.lambda$3(TargetDefinition.java:395)
at java.base/java.util.HashMap.forEach(HashMap.java:1429)
at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:392)
at org.eclipse.pde.internal.ui.preferences.TargetPlatformPreferencePage$1.run(TargetPlatformPreferencePage.java:407)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
The target definition xml looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="RCP Target" sequenceNumber="70">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.draw2d.feature.group" version="3.23.0.202502242203"/>
<unit id="org.eclipse.draw2d.source.feature.group" version="3.23.0.202502242203"/>
<unit id="org.eclipse.gef.feature.group" version="3.23.0.202502242203"/>
<unit id="org.eclipse.gef.source.feature.group" version="3.23.0.202502242203"/>
<repository location="https://download.eclipse.org/tools/gef/classic/release/3.23.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.equinox.executable.feature.group" version="3.8.2800.v20250227-1734"/>
<unit id="org.eclipse.platform.feature.group" version="4.35.0.v20250228-0640"/>
<unit id="org.eclipse.platform.source.feature.group" version="4.35.0.v20250228-0640"/>
<unit id="org.eclipse.rcp.feature.group" version="4.35.0.v20250228-0640"/>
<unit id="org.eclipse.rcp.source.feature.group" version="4.35.0.v20250228-0640"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.35/R-4.35-202502280140/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.babel.nls_eclipse_de.feature.group" version="4.26.0.v20230220105658"/>
<unit id="org.eclipse.babel.nls_tools.gef_de.feature.group" version="4.26.0.v20230220105658"/>
<repository location="https://download.eclipse.org/technology/babel/update-site/R0.20.0/2022-12"/>
</location>
<location path="C:\src\project\workspace\target" type="Directory"/>
</locations>
</target>
What I tried so far:
%USERPROFILE%\.eclipse
and %USERPROFILE\.m2
I tried it in a local Hyper-V Windows 11 Dev Environment VM and it gets the same issue.
Colleagues do not have this problem. I was unable to find a fix for this online and I am honestly out of ideas. Do you have any idea what might be wrong?
As it turns out there was a wrong version number of a dependency, the team lead of the project found it later. Their dependencies were cached so it worked for some time. It is now fixed.