Repository navigation
Closed
Labels
Description
Eclipse 4.17 requires Java 11+ to run. If you try to run it with Java 8, there are no explicit warnings about using the wrong version, and eclipse will start successfully. However, you won't actually be able to use it, it's functionally broken.
If you start ide with Java 11, the task fails like so:
> Task :ide:ideSetupP2
!SESSION 2020-09-17 10:04:12.926 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.8
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -application org.eclipse.equinox.p2.director -repository https://download.eclipse.org/eclipse/updates/4.17/R-4.17-202009021800/,https://download.eclipse.org/wildwebdeveloper/releases/0.9.1/ -artifactRepository file:///Users/ntwigg/.goomph/shared-bundles -installIU org.eclipse.platform.ide,org.eclipse.jdt.feature.group,org.eclipse.ui.views.log,org.eclipse.wildwebdeveloper.feature.feature.group -profile OomphIde -destination file:///Users/ntwigg/Documents/dev/mytakedotorg/ide/build/oomph-ide.app -bundlepool /Users/ntwigg/.goomph/shared-bundles -p2.os macosx -p2.ws cocoa -p2.arch x86_64
Command-line arguments: -application org.eclipse.equinox.p2.director -clean -consolelog -repository https://download.eclipse.org/eclipse/updates/4.17/R-4.17-202009021800/,https://download.eclipse.org/wildwebdeveloper/releases/0.9.1/ -artifactRepository file:///Users/ntwigg/.goomph/shared-bundles -installIU org.eclipse.platform.ide,org.eclipse.jdt.feature.group,org.eclipse.ui.views.log,org.eclipse.wildwebdeveloper.feature.feature.group -profile OomphIde -destination file:///Users/ntwigg/Documents/dev/mytakedotorg/ide/build/oomph-ide.app -bundlepool /Users/ntwigg/.goomph/shared-bundles -p2.os macosx -p2.ws cocoa -p2.arch x86_64
!ENTRY org.eclipse.osgi 4 0 2020-09-17 10:04:12.949
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Cannot support framework extension bundles without a public addURL(URL) method on the framework class loader: org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513 [36]
at org.eclipse.osgi.storage.FrameworkExtensionInstaller.addExtensionContent0(FrameworkExtensionInstaller.java:104)
at org.eclipse.osgi.storage.FrameworkExtensionInstaller.addExtensionContent(FrameworkExtensionInstaller.java:79)
at org.eclipse.osgi.internal.loader.SystemBundleLoader$SystemModuleClassLoader.loadFragments(SystemBundleLoader.java:129)
at org.eclipse.osgi.internal.loader.SystemBundleLoader.loadClassLoaderFragments(SystemBundleLoader.java:111)
at org.eclipse.osgi.internal.loader.BundleLoader.loadFragments(BundleLoader.java:282)
at org.eclipse.osgi.container.ModuleWiring.loadFragments(ModuleWiring.java:273)
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:710)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:511)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:457)
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1001)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1382)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY org.eclipse.core.net 1 0 2020-09-17 10:04:13.413
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.ecf.provider.filetransfer.httpclient4.SNIAwareHttpClient$1 (file:/Users/ntwigg/.goomph/p2-bootstrap/4.7.2/plugins/org.eclipse.ecf.provider.filetransfer.httpclient4_1.1.200.v20170314-0133.jar) to method sun.security.ssl.SSLSocketImpl.setHost(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.eclipse.ecf.provider.filetransfer.httpclient4.SNIAwareHttpClient$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Installing org.eclipse.platform.ide 4.17.0.I20200902-1800.
Installing org.eclipse.jdt.feature.group 3.18.500.v20200902-1800.
Installing org.eclipse.ui.views.log 1.2.1200.v20200828-0938.
Installing org.eclipse.wildwebdeveloper.feature.feature.group 0.9.1.202005041657.
An error occurred while installing the items
Installation failed.
session context was:(profile=OomphIde, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.google.gson 2.8.2.v20180104-1110, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
Could not acquire the framework manipulator service.
Caused by: Application failed, log file location: /Users/ntwigg/.goomph/p2-bootstrap/4.7.2/configuration/1600362252277.log
!ENTRY org.eclipse.equinox.p2.engine 4 4 2020-09-17 10:04:23.625
!MESSAGE An error occurred while installing the items
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2020-09-17 10:04:23.626
!MESSAGE session context was:(profile=OomphIde, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.google.gson 2.8.2.v20180104-1110, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2020-09-17 10:04:23.626
!MESSAGE Could not acquire the framework manipulator service.
!STACK 0
java.lang.IllegalStateException: Could not acquire the framework manipulator service.
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:45)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:108)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.installBundle(InstallBundleAction.java:75)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.execute(InstallBundleAction.java:32)
at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:39)
at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:184)
at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:96)
at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:47)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:77)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:45)
at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:42)
at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:24)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.executePlan(DirectorApplication.java:813)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.planAndExecute(DirectorApplication.java:806)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:793)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1111)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:1293)
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 com.diffplug.gradle.eclipserunner.EquinoxLauncher$Running.run(EquinoxLauncher.java:190)
at com.diffplug.gradle.eclipserunner.EquinoxLauncher$Running.access$100(EquinoxLauncher.java:172)
at com.diffplug.gradle.eclipserunner.EquinoxLauncher.run(EquinoxLauncher.java:163)
at com.diffplug.gradle.eclipserunner.JarFolderRunner.run(JarFolderRunner.java:37)
at com.diffplug.gradle.eclipserunner.JarFolderRunnerExternalJvm$RunOutside.run(JarFolderRunnerExternalJvm.java:126)
at com.diffplug.gradle.JavaExecable.main(JavaExecable.java:134)
It's really important for Goomph to support the latest version of eclipse. Goomph still works with 4.17 with the mavenCentral plugin, but the ide plugin needs to work too. It would be nice for Goomph to stay compatible with Java 8, but if we have to bump our minimum required Java to 11, I'm okay with that.
Fixing this is important, but I don't expect to have time to look at this further until early 2021. PRs are welcome!
Activity
nedtwigg commentedon Sep 17, 2020
Related: #127, #99, #69.
drkstr101 commentedon Sep 21, 2020
Ugg, what a pain (RE supporting both Java 8/11). I need a version of ANTLWorks that only works with 1.8, but VScode and now Eclipse are forcing Java 11. I better start getting ahead of this. Any ideas on where to get started, or is that the first steps here?
nedtwigg commentedon Sep 21, 2020
The most obvious place to start would be upgrading the eclipse launcher jars and code. The jars are defined here:
goomph/build.gradle
Lines 44 to 53 in d95be31
And the code is here:
https://github.com/diffplug/goomph/tree/main/src/main/java/com/diffplug/gradle/eclipserunner/launcher
How to do it
A long time ago, you couldn't apply a gradle plugin to the
build.gradleof the build that built it (aka you could not bootstrap). That is fixed now, so you could useeclipseMavenCentralto get the latest4.17jars intobuild.gradle.And as for the
eclipserunner.launcherpackage, that code was just straight copy-pasted from the super-old Eclipse Mars.2. I'm not sure which package it came from originally, but it shouldn't be too hard to track down.Past those two things (updating the jars, updating the
.launcherpackage), I would just follow a stacktrace, then try to fix it. Follow the next stacktrace, try to fix that.As mentioned before, these upgrades are likely to drop support for all the old Eclipse's. But I think that's fine,
goomphisn't adding a ton of features, so I think it's fine to say "if you want Eclipse < 4.17, use Goomph vBlah".drkstr101 commentedon Sep 22, 2020
Awesome, thanks for the head start! I will start plugging away at it and see if I can make any progress on this. I will have more time at the end of the week, so I'll post back then with any results.
drkstr101 commentedon Oct 14, 2020
Sorry it took me so long to get back to this. I have all my DevOps up and running on Java 11 now, so hopefully I can make some progress on this.
drkstr101 commentedon Oct 21, 2020
FYI I am going to start testing this in watheia/gradle-and-eclipse-rcp, so I will add a branch there for java-11.
drkstr101 commentedon Oct 21, 2020
@nedtwigg When you have a min, could you please give me some additional context on where I can look into making changes to the following in the
build.gradleI'm not exactly sure if those symbols are intentional or some kind of encoding error, but I was more curious about where I can locate, and make changes to, the referenced Gradle file.
Cheers, and thank you!
nedtwigg commentedon Oct 21, 2020
https://github.com/diffplug/blowdryer
drkstr101 commentedon Oct 21, 2020
Ah, of course. Says so right above that block of code!
Thanks for the speedy reply. =)
nedtwigg commentedon Oct 21, 2020
Sorry for brief answer from phone, juggling sick kids. The longer answer is to swap the comment here:
goomph/settings.gradle
Lines 22 to 25 in 292e0eb
and clone this repo in a folder next to goomph: https://github.com/diffplug/blowdryer-diffplug
drkstr101 commentedon Oct 21, 2020
No worries, I just clicked the link at the top of the README to find it.
FYI I am attempting to get the CI workspace set up here; https://gitlab.com/watheia/diffplug
If you have a GitLab account I can add you on if you wish.
Once it's working I will be able to run "Auto DevOps" against
graalvm-java11native images on a DO droplet. I expect this to blow up in my face, but hopefully, it will at least shake out a few issues with java-next compatibility.drkstr101 commentedon Oct 22, 2020
Unfortunately, decoupled projects seem to break classpath resolution with p2 targets. You want me to see if I can take a stab at that first, assuming it's not just something stupid in my setup?
(pass) https://gitlab.com/watheia/diffplug/-/jobs/805215016
(fail) https://gitlab.com/watheia/diffplug/-/jobs/805235920
Note: At this point, I'm just trying to get everything up and running on java-8, before I move on to the more challenging bit. I have done a few experiments locally to test the waters, but I need to integrate cross-project builds to make any real progress.
nedtwigg commentedon Oct 22, 2020
Very cool approach you are taking! I have two points:
1 ) You don't have to include
blowdryer-diffplugas a build.blowdryeris an extremely simple plugin.blowdryer-diffplugis just a central collection ofscript.gradlefiles, which we use across our fleet of projects to set conventions for our org. There are otherblowdryer-fooout there, for other organizations.The
goomphbuild (indevLocalmode) literally just slurpsscript.gradlefiles from the local filesystem, and that's it. When it's ingithubmode, it's downloading and caching thosescript.gradlefiles usinghttp GET. That's all. Including it in thesettings.gradlewill have no effect at all.2 ) I'm surprised by the error, and it looks like you know more about composite builds than I do. My only feedback is that the only time I've had success using composite builds with plugins is this:
I think your submodule repo is a great idea, but I think you can probably get away with just modifying the
settings.gradleof thegradle-and-eclipse-rcpproject, rather than having a parent build. If the parent build works, then I say go for it. But it might be worth seeing if ditching the parent build (but keeping the monorepo) fixes anything.11 remaining items
drkstr101 commentedon Oct 27, 2020
spotbugsworked as expected (reporting 9 ignored failures) after a major version bump and some tweaks inbuild.gradle.We now have
goomphup and running ongradle:6.7-jdk8. Let's see if we can get that toogradle:6.7-jdk11tomorrow!drkstr101 commentedon Oct 27, 2020
Well, shoot. Now we get to figure out why my native JDK11 toolchain only produces warnings on
javadoc, but those same warnings are now errors when run fromgradle:6.7-jdk11Docker image.I will keep at it, just giving you a heads up!
drkstr101 commentedon Oct 28, 2020
@nedtwigg Here is the first working
goomphbuild ongradle:6.7-jdk11:https://gitlab.com/watheia/diffplug/-/pipelines/208489628
There are a few bits disabled in dev tasks, but tests are passing. Still no idea why localhost produced different results than Docker, but I worked around it by setting
failOnErrorto false in all thejavadocblocks.ralfgrossklaus commentedon Dec 15, 2020
Hi Ned,
I looked in that issue as we are upgrading to Java 11 and the version of "goomph" that we use is quite old. It was kind of a struggle, but i made some progress the last days so i want to inform about my findings:
I created a new version of the p2-bootstrap with Eclipse 4.13 (because it supports both, Java 8 and Java 11). The problem was, that Eclipse removed the update.configurator reconciling code from the platform with https://bugs.eclipse.org/bugs/show_bug.cgi?id=527783, so the new bootstrap needs to use the simple configurator and a complete bundles.info.
The p2-bootstrap works with Java 8, but haves some problems when running with Java 11. I tried to add
--add-modules=ALL-SYSTEMto the JVM options when the process is forked for the bootstrap, but that didn't help (even though i think that it is still necessary, as this option is in the .ini file for all Eclipse versions which supports Java 9+). I think the problem you mentioned is due to the different class loader architecture that was introduced with Java 9. The Classloader that starts Eclipse in the P2 bootstrap does not inherit from URLClassloader and thus missing the "addURL" method. If i interpret the comment in https://bugs.eclipse.org/bugs/show_bug.cgi?id=515286#c2 correctly, Eclipse has to be started using an URLClassloader in order to use Framework Extensions. So i think there should be a mechanism to detect which Java Version is used and for 9+ Eclipse will be launched not using the default Classloader.I will do some further investigation this week and hope i can come up with a solution that i can share here.
Regards, Ralf
nedtwigg commentedon Dec 15, 2020
Great, thanks very much @ralfgrossklaus, looking forward to see what you come up with :)
ralfgrossklaus commentedon Dec 17, 2020
You're welcome. I am still working on the classloader issue. But you can have look about the changes for an Eclipse 4.13.0 bootstrap here: https://github.com/ralfgrossklaus/goomph/tree/4.13.0_p2_bootstrap
Not much to do. The main problem was to find the reason why the the bundle initialization did not work anymore. I added my boostrap zip to dropbox here: https://www.dropbox.com/s/zgxj3blfevsb9gz/goomph-p2-bootstrap.zip?dl=0
What I did to create it was the following:
eclipsec.exe -application org.eclipse.equinox.p2.director -repository <OUR_ECLIPSE_MIRROR> -installIU org.eclipse.equinox.p2.core.feature.feature.group,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.repository.tools,org.eclipse.core.net,org.eclipse.osgi.compatibility.state,org.eclipse.ant.core,org.apache.ant,org.eclipse.core.runtime,org.eclipse.update.configurator,org.eclipse.equinox.ds,org.eclipse.equinox.p2.reconciler.dropins -tag InitialState -destination d:/4.13.0/goomph-p2-bootstrap/ -profile SDKProfile -profileProperties org.eclipse.update.install.features=true -bundlepool d:/4.13.0/goomph-p2-bootstrap/It works on our local mirror, however the bootstrap is currently 18MB which is quite a bit more than the old one. Not sure which plugins can be removed safely from the ZIP in order to bring the size down. Im afraid I don't have much time to look into this, as It is not much of a problem in our local network. But i guess when you want to publish one to bintray, a smaller version would be better?
I will keep you updated about my progress.
Regards, Ralf
nedtwigg commentedon Dec 17, 2020
Great, thanks very much! The old bootstraps were created like so, but your way works great too. I'm not particularly worried about the size of the bootstrap jar.
Aside: you're doing links like this (I've been editing your comments to fix them)
which goes to the URL
url, and not tohttps://www.dropbox.com/etc. If you just plop the URL inline github will automatically mark it as a link, or you can do something likeif you're trying to make the text smaller.
ralfgrossklaus commentedon Jan 26, 2021
Hi!
small update on the Java 11 issue: I managed to start PDE using a URL classloader in in JarFolderRunner to startup Eclipse. It works as far as I can see; however i haven't cleaned up my code and i haven't tested it extensively yet (I am behind a company firewall were i have to deactivate lots of the tests). I am planning doing so maybe at the weekend.
Regards
nedtwigg commentedon Feb 11, 2021
@ralfgrossklaus I'm taking a stab at this now too, and your hints above have been fantastically helpful. If you have an unfinished WIP branch, I'd love to take a peek!
ralfgrossklaus commentedon Feb 11, 2021
@nedtwigg Sure. You can take a look at my j11 branch. There are a few issues with it, hence i haven't created a PR yet.
Besides that and if the boostrap pde is provided, it should run for Java 11. I haven't tested it for java 8 however.
Regards, Ralf
nedtwigg commentedon Feb 11, 2021
Interesting. On my branch, I updated
Mainto the latest from eclipse, andStartupClassLoaderis an inner class there:https://github.com/eclipse/rt.equinox.framework/blob/d7c024f15311e85a8572d5532fb4a8e51982f92d/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java#L2681-L2730
Your
StartupClassLoaderis mostly the same, except that it addsaddExtensionPath. Did you add that, or did you find it in an eclipse source somewhere?nedtwigg commentedon Feb 12, 2021
Huzzah! Your fork is amazing. I've mushed things around a bit, should have a new release later tonight.
drkstr101 commentedon Feb 12, 2021
Hey friend! I apologize for the lack of activity. Iv'e been busy launching a startup!
I have a meeting in a couple hours (11:30 Pacific), but I'm free the rest of the afternoon.
PS: This is a bit embarrassing, but the reason I could get it to work in Docker and not localhost is because I had accidently installed jre instead of jdk.
¯\_(ツ)_/¯nedtwigg commentedon Feb 13, 2021
Thanks for all the help! A fix is shipped in
3.28.0. On my fleet of projects:So there will definitely be bugfix releases, but it's working.