eclipse-windowbuilder / windowbuilder

Eclipse Windowbuilder
https://projects.eclipse.org/projects/tools.windowbuilder
Eclipse Public License 1.0
80 stars 30 forks source link

Initialization error #865

Closed striveprover closed 3 months ago

striveprover commented 3 months ago

Installed WindowBuilder 1.16 from Marketplace with Eclipse 2024-03 and Java 17.

The following error happens at startup and almost any interaction with eclipse. An internal error occurred during: "Initializing plug-in models". 'java.util.Set org.eclipse.jdt.launching.JavaRuntime.getProvidedVMPackages(org.eclipse.jdt.launching.IVMInstall, java.lang.String)'

Error log shows the following 3 errors. eclipse.buildId=4.31.0.20240307-1200 java.version=17.0.11 java.vendor=Eclipse Adoptium 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 -data C:\Users\user2\devstudio-develop8\ws -data file:/C:/Users/user2/devstudio-develop8/ws/

org.eclipse.core.jobs Error Fri Aug 09 12:03:29 CDT 2024 An internal error occurred during: "Initializing plug-in models".

java.lang.NoSuchMethodError: 'java.util.Set org.eclipse.jdt.launching.JavaRuntime.getProvidedVMPackages(org.eclipse.jdt.launching.IVMInstall, java.lang.String)' at org.eclipse.pde.internal.build.site.PDEState.querySystemPackages(PDEState.java:625) at org.eclipse.pde.internal.build.site.PDEState.lambda$5(PDEState.java:540) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.eclipse.pde.internal.build.site.PDEState.querySystemPackages(PDEState.java:519) at org.eclipse.pde.internal.build.site.PDEState.getSystemPackages(PDEState.java:489) at org.eclipse.pde.internal.core.TargetPlatformHelper.getSystemPackages(TargetPlatformHelper.java:392) at org.eclipse.pde.internal.core.TargetPlatformHelper.addEnvironmentProperties(TargetPlatformHelper.java:379) at org.eclipse.pde.internal.core.TargetPlatformHelper.getPlatformProperties(TargetPlatformHelper.java:366) at org.eclipse.pde.internal.core.MinimalState.initializePlatformProperties(MinimalState.java:261) at org.eclipse.pde.internal.core.PDEState.(PDEState.java:70) at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:583) at org.eclipse.pde.internal.core.PluginModelManager.targetReloaded(PluginModelManager.java:516) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.lambda$0(RequiredPluginsInitializer.java:33) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:187) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

eclipse.buildId=4.31.0.20240307-1200 java.version=17.0.11 java.vendor=Eclipse Adoptium 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 -data C:\Users\user2\devstudio-develop8\ws -data file:/C:/Users/user2/devstudio-develop8/ws/

org.eclipse.core.jobs Error Fri Aug 09 11:53:23 CDT 2024 An internal error occurred during: "Initializing Java Tooling".

java.lang.NoSuchMethodError: 'java.util.Set org.eclipse.jdt.launching.JavaRuntime.getProvidedVMPackages(org.eclipse.jdt.launching.IVMInstall, java.lang.String)' at org.eclipse.pde.internal.build.site.PDEState.querySystemPackages(PDEState.java:625) at org.eclipse.pde.internal.build.site.PDEState.lambda$5(PDEState.java:540) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.eclipse.pde.internal.build.site.PDEState.querySystemPackages(PDEState.java:519) at org.eclipse.pde.internal.build.site.PDEState.getSystemPackages(PDEState.java:489) at org.eclipse.pde.internal.core.TargetPlatformHelper.getSystemPackages(TargetPlatformHelper.java:392) at org.eclipse.pde.internal.core.TargetPlatformHelper.addEnvironmentProperties(TargetPlatformHelper.java:379) at org.eclipse.pde.internal.core.TargetPlatformHelper.getPlatformProperties(TargetPlatformHelper.java:366) at org.eclipse.pde.internal.core.MinimalState.initializePlatformProperties(MinimalState.java:261) at org.eclipse.pde.internal.core.PDEState.(PDEState.java:70) at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:583) at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1037) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:50) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3316) at org.eclipse.jdt.internal.core.JavaModelManager$11.run(JavaModelManager.java:3200) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2448) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2473) at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:3262) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2214) at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:4726) at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:39) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

eclipse.buildId=4.31.0.20240307-1200 java.version=17.0.11 java.vendor=Eclipse Adoptium 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 -data C:\Users\user2\devstudio-develop8\ws -data file:/C:/Users/user2/devstudio-develop8/ws/

org.eclipse.core.jobs Error Fri Aug 09 11:53:23 CDT 2024 An internal error occurred during: "Initializing plug-in models".

java.lang.NoSuchMethodError: 'java.util.Set org.eclipse.jdt.launching.JavaRuntime.getProvidedVMPackages(org.eclipse.jdt.launching.IVMInstall, java.lang.String)' at org.eclipse.pde.internal.build.site.PDEState.querySystemPackages(PDEState.java:625) at org.eclipse.pde.internal.build.site.PDEState.lambda$5(PDEState.java:540) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.eclipse.pde.internal.build.site.PDEState.querySystemPackages(PDEState.java:519) at org.eclipse.pde.internal.build.site.PDEState.getSystemPackages(PDEState.java:489) at org.eclipse.pde.internal.core.TargetPlatformHelper.getSystemPackages(TargetPlatformHelper.java:392) at org.eclipse.pde.internal.core.TargetPlatformHelper.addEnvironmentProperties(TargetPlatformHelper.java:379) at org.eclipse.pde.internal.core.TargetPlatformHelper.getPlatformProperties(TargetPlatformHelper.java:366) at org.eclipse.pde.internal.core.MinimalState.initializePlatformProperties(MinimalState.java:261) at org.eclipse.pde.internal.core.PDEState.(PDEState.java:70) at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:583) at org.eclipse.pde.internal.core.PluginModelManager.targetReloaded(PluginModelManager.java:516) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.lambda$0(RequiredPluginsInitializer.java:33) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:187) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

image

ptziegler commented 3 months ago

I'm not really sure if this is really a problem with WindowBuilder...

Based on what you've provided, I can only suspect that the version of PDE that has been installed in your IDE is incompatible with the installed version of JDT.

From what I can tell, the method JavaRuntime.getProvidedVMPackages(...) has been added roughly 4 months ago, after the 2024-03 release. PDE referencing this method makes me believe that this is a newer version, likely from the 2024-06 release.

Now the question becomes: "How did PDE get updated?". WindowBuilder has a pretty low bound for the required PDE version, so with any recent Eclipse version, the installation should not cause an update on its own.

https://github.com/eclipse-windowbuilder/windowbuilder/blob/6db5686af365a55c768ecb86292fd2fe963763f6/org.eclipse.wb.swt.feature_feature/feature.xml#L21-L24

But your screenshot makes it look like you're using the Eclipse for Java Developers, which doesn't come with PDE installed. This is one of the few cases where the WindowBuilder installation would also install PDE.

More specifically, the latest it can find. So I assume that somewhere in your installation, there is a reference to the 2024-06 update site. But that also means that the problem is because the PDE project hasn't properly updated their dependencies, as the version of JDT they require is higher than what they have specified...

But enough rambling. To fix this issue, I suggest to update your IDE to 2024-06. Though just a fair warning the 2024-06 EPP requires Java 21!

image

ptziegler commented 3 months ago

I've created https://github.com/eclipse-pde/eclipse.pde/pull/1373 to fix the version constraint in PDE. I don't see what else can be done from the WindowBuilder side.

As mentioned, I can only suggest to update the Eclipse IDE to 2024-06 like I've described above, to get your installation into a stable state again.

striveprover commented 3 months ago

Thank you for the quick response. Staying with Java 17 was a goal for this release. I may wait until the next release to pull in Window Builder. I use Oomph to create my development space from the 2024-03 release and the 2022 Orbit sites. I had already noticed some transitive dependencies which were creating problem. I'll look at adding version restrictions.

ptziegler commented 3 months ago

Thank you for the quick response. Staying with Java 17 was a goal for this release. I may wait until the next release to pull in Window Builder.

Alternatively, you can also explicitly install PDE from the 2024-03 update site, before installing WindowBuilder. The only reason PDE got installed because it wasn't already. If there's already a recent version in your IDE then there should be no need to update to the one from the 2024-06 release.