eclipse-java-2022-03-R-linux-gtk-x86_64.tar.gzhttp://storage.googleapis.com/gwt-eclipse-plugin/v3/release/org.osgi.framework.BundleException: Could not resolve module: com.gwtplugins.gdt.eclipse.core [600]
Unresolved requirement: Require-Bundle: com.gwtplugins.gdt.eclipse.platform
-> Bundle-SymbolicName: com.gwtplugins.gdt.eclipse.platform; bundle-version="3.0.0.201710131939"; singleton:="true"
com.gwtplugins.gdt.eclipse.platform [602]
No resolution report for the bundle. Bundle was not resolved because of a uses constraint violation.
org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource com.gwtplugins.gdt.eclipse.platform [osgi.identity; type="osgi.bundle"; version:Version="3.0.0.201710131939"; osgi.identity="com.gwtplugins.gdt.eclipse.platform"; singleton:="true"] because it is exposed to package 'javax.servlet' from resources javax.servlet [osgi.identity; type="osgi.bundle"; version:Version="3.0.0.v201112011016"; osgi.identity="javax.servlet"] and jakarta.servlet-api [osgi.identity; type="osgi.bundle"; version:Version="4.0.0"; osgi.identity="jakarta.servlet-api"] via two dependency chains.
Chain 1:
com.gwtplugins.gdt.eclipse.platform [osgi.identity; type="osgi.bundle"; version:Version="3.0.0.201710131939"; osgi.identity="com.gwtplugins.gdt.eclipse.platform"; singleton:="true"]
require: (osgi.wiring.bundle=javax.servlet)
|
provide: osgi.wiring.bundle: javax.servlet
javax.servlet [osgi.identity; type="osgi.bundle"; version:Version="3.0.0.v201112011016"; osgi.identity="javax.servlet"]
Chain 2:
com.gwtplugins.gdt.eclipse.platform [osgi.identity; type="osgi.bundle"; version:Version="3.0.0.201710131939"; osgi.identity="com.gwtplugins.gdt.eclipse.platform"; singleton:="true"]
require: (osgi.wiring.bundle=org.eclipse.jetty.servlet)
|
provide: osgi.wiring.bundle; bundle-version:Version="10.0.6"; osgi.wiring.bundle="org.eclipse.jetty.servlet"
org.eclipse.jetty.servlet [osgi.identity; type="osgi.bundle"; version:Version="10.0.6"; osgi.identity="org.eclipse.jetty.servlet"]
import: (&(osgi.wiring.package=javax.servlet)(&(version>=4.0.0)(!(version>=5.0.0))))
|
export: osgi.wiring.package: javax.servlet
jakarta.servlet-api [osgi.identity; type="osgi.bundle"; version:Version="4.0.0"; osgi.identity="jakarta.servlet-api"]
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)我的系统是Eclipse描述的:
eclipse.buildId=4.23.0.I20220308-0310
java.version=17.0.3
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product -data XXXXXXXXXuname -a:Linux mycomputername #25~20.04.2tux1 SMP Tue Apr 12 10:34:50 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux: Ubuntu20.04.4LTS与"Budgie“桌面
我还尝试了另一个Eclipse版本,但结果是相同的。(eclipse-SDK-4.23-linux-gtk-x86_64.tar.gz)
我发现了其他的BundleException问题,但是只有一个用于GWT没有答案。其他的问题也不适用于这个问题。它们是由应用程序创建者造成的,但我不是GWT的创建者,其他人使用它时没有问题。
编辑2022.05.01:
我没有找到解决方案,但找到了奇怪的解决办法:如果我使用Eclipse下载而不使用“工具”,并使用一个".p2f“文件与一个旧的Eclipse站点一起安装一个旧版本的”工具“,那么GWT就能工作了。
这个问题与javax.servlet ".jar“文件有关。如果Eclipse决定下载javax.servlet_3.1.0.v201410161800.jar,GWT工作。但是,如果Eclipse决定使用javax.servlet_3.0.0.v201112011016.jar,则GWT无法工作。奇怪的是:新版本的Eclipse使用".jar“的旧版本,旧版本的Eclipse使用".jar”的更新版本。
对于来自https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/的Eclipse,下面的".p2f“文件为我提供了一个正常工作的GWT安装:
<?xml version='1.0' encoding='UTF-8'?>
<?p2f version='1.0.0'?>
<p2f version='1.0.0'>
<ius size='3'>
<iu id='org.eclipse.jst.web_ui.feature.feature.group' name='Eclipse Java Web Developer Tools' version='3.22.0.v202103200058'>
<repositories size='1'>
<repository location='https://download.eclipse.org/releases/2021-06'/>
</repositories>
</iu>
<iu id='com.gwtplugins.eclipse.sdkbundle.gwt28.feature.feature.group' name='GWT 2.8.1 SDK' version='2.8.0.201710131939'>
<repositories size='1'>
<repository location='http://storage.googleapis.com/gwt-eclipse-plugin/v3/release'/>
</repositories>
</iu>
<iu id='com.gwtplugins.eclipse.suite.v3.feature.feature.group' name='GWT Eclipse Plugin' version='3.0.0.201710131939'>
<repositories size='1'>
<repository location='http://storage.googleapis.com/gwt-eclipse-plugin/v3/release'/>
</repositories>
</iu>
</ius>
</p2f>然后,卸载旧的“工具”并从当前更新站点安装当前版本。GWT将继续工作。
就像我说的,这不是一个解决方案,只是一个奇怪的解决办法。
发布于 2022-04-27 17:09:44
这似乎是com.gwtplugins.gdt.eclipse.platform包中的一个缺陷,它使用Require来访问本应使用Import的javax.servlet包。
com.gwtplugins.gdt.eclipse.platform需要- bundle的javax.servlet包和org.eclipse.jetty.servlet包,它们使用了javax.servlet包的不同版本,因此无法正确构造类加载器。
发布于 2022-06-14 14:57:23
在不手动更改eclipse安装文件的情况下,获得GWT插件的最简单方法是:
2021-09之后的任何Eclipse版本都不会让您成功安装GWT插件。希望2022-06能解决这个问题
https://stackoverflow.com/questions/72031131
复制相似问题