gwt-plugins/gwt-eclipse-plugin

Error in eclipse log even after applying suggested patches

protoism opened this issue · 1 comments

Using a locally built version of Eclipse plugin on Eclipse 2022-09 with foal patches (#403 #407 #410) I get errors such as this one.
Anyone knows how to fix them? @foal?
It seems like a clash between two versions of org.w3c.dom, one supporting modules, the other not, possibly appearing on newer jdks

!ENTRY org.eclipse.jdt.core 4 4 2022-12-05 16:13:51.061
!MESSAGE Exception occurred while creating compilation participant
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in com.gwtplugins.gdt.eclipse.suite.update was unable to load class com.google.gdt.eclipse.suite.update.builders.UpdateTriggerCompilationParticipant.
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:212)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:198)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:920)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants$1.run(JavaModelManager.java:454)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants.getCompilationParticipants(JavaModelManager.java:447)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:629)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:182)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1024)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:254)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:311)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:400)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:403)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:514)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:462)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:544)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:161)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:255)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle com.gwtplugins.gdt.eclipse.suite.update (570).
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:126)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:570)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:335)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:397)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:500)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:622)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
	... 21 more
Caused by: org.osgi.framework.BundleException: Exception in com.google.gdt.eclipse.suite.update.GdtExtPlugin.start() of bundle com.gwtplugins.gdt.eclipse.suite.update.
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:839)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:767)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1032)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:513)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
	... 30 more
Caused by: java.lang.Error: Unresolved compilation problems: 
	The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml
	The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml
	The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml
	Element cannot be resolved to a type
	Element cannot be resolved to a type
	NodeList cannot be resolved to a type
	Node cannot be resolved to a type
	Node cannot be resolved to a variable
	Element cannot be resolved to a type
	Element cannot be resolved to a type
	Element cannot be resolved to a type

	at com.google.gdt.eclipse.core.update.internal.core.FeatureUpdateChecker$UpdateComputer.<init>(FeatureUpdateChecker.java:20)
	at com.google.gdt.eclipse.suite.update.GdtExtPlugin$1.<init>(GdtExtPlugin.java:141)
	at com.google.gdt.eclipse.suite.update.GdtExtPlugin.initializeFeatureUpdateManager(GdtExtPlugin.java:141)
	at com.google.gdt.eclipse.suite.update.GdtExtPlugin.start(GdtExtPlugin.java:119)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:818)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:810)
	... 37 more
!SUBENTRY 1 org.eclipse.equinox.registry 4 1 2022-12-05 16:13:51.061
!MESSAGE Plug-in com.gwtplugins.gdt.eclipse.suite.update was unable to load class com.google.gdt.eclipse.suite.update.builders.UpdateTriggerCompilationParticipant.
!STACK 0
java.lang.ClassNotFoundException: An error occurred while automatically activating bundle com.gwtplugins.gdt.eclipse.suite.update (570).
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:126)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:570)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:335)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:397)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:500)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:622)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:920)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants$1.run(JavaModelManager.java:454)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants.getCompilationParticipants(JavaModelManager.java:447)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:629)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:182)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1024)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:254)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:311)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:400)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:403)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:514)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:462)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:544)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:161)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:255)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.osgi.framework.BundleException: Exception in com.google.gdt.eclipse.suite.update.GdtExtPlugin.start() of bundle com.gwtplugins.gdt.eclipse.suite.update.
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:839)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:767)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1032)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:513)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
	... 30 more
Caused by: java.lang.Error: Unresolved compilation problems: 
	The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml
	The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml
	The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml
	Element cannot be resolved to a type
	Element cannot be resolved to a type
	NodeList cannot be resolved to a type
	Node cannot be resolved to a type
	Node cannot be resolved to a variable
	Element cannot be resolved to a type
	Element cannot be resolved to a type
	Element cannot be resolved to a type

	at com.google.gdt.eclipse.core.update.internal.core.FeatureUpdateChecker$UpdateComputer.<init>(FeatureUpdateChecker.java:20)
	at com.google.gdt.eclipse.suite.update.GdtExtPlugin$1.<init>(GdtExtPlugin.java:141)
	at com.google.gdt.eclipse.suite.update.GdtExtPlugin.initializeFeatureUpdateManager(GdtExtPlugin.java:141)
	at com.google.gdt.eclipse.suite.update.GdtExtPlugin.start(GdtExtPlugin.java:119)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:818)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:810)
	... 37 more

The problem was in the eclipse plugin embedding a full version of gwt-dev, which includes non module-compatible versions of xml dom libraries.
Here (hopefully) the fix foosoftsrl@76dff91