Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eclipse v4.17/v4.18/v4.19 (2020-09/2020-12/2021-03) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" #407

Open
titou10titou10 opened this issue Sep 16, 2020 · 39 comments
Assignees

Comments

@titou10titou10
Copy link
Contributor

titou10titou10 commented Sep 16, 2020

After a fresh install of "Eclipse IDE for Enterprise Java Developers" 2020-09 (v4.17) + AdoptOpenJDK 11.0.8 + WDT v20.0.0.9, the logs are populated with tons of logs like those:

It seems that"com.sun.jdi"is missing

!ENTRY com.ibm.ws.st.was.core 4 0 2020-09-16 12:54:19.065
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.ibm.ws.st.was.core [1228]
  Unresolved requirement: Import-Package: com.ibm.ws.st.core.internal.config
    -> Export-Package: com.ibm.ws.st.core.internal.config; bundle-symbolic-name="com.ibm.ws.st.core"; bundle-version="1.0.909.v2020-08-26_1523"; version="0.0.0"; x-friends:="com.ibm.ws.st.ui,  com.ibm.ws.st.jee.core,  com.ibm.ws.st.docker.core,  com.ibm.ws.st.docker.ui"
   com.ibm.ws.st.core [1215]
     Unresolved requirement: Import-Package: com.sun.jdi; bundle-symbolic-name="org.eclipse.jdt.debug"
  Unresolved requirement: Import-Package: com.ibm.ws.st.core.internal
    -> Export-Package: com.ibm.ws.st.core.internal; bundle-symbolic-name="com.ibm.ws.st.core"; bundle-version="1.0.909.v2020-08-26_1523"; version="0.0.0"; x-friends:="com.ibm.ws.st.ui,  com.ibm.ws.st.docker.core,  com.ibm.ws.st.docker.ui"

at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
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)

[UPDATED 2020-09-17]
We now better understand what's happening here
After installing eclipse 4.17, we set the JDK to AdoptOpenJDK v11.0.0.8 ineclipse.ini::

-vm
P:/jdk11_64_openjdk/bin/javaw.exe

Then we install WDT. When asked to restart, eclipse crashed (?). We started it again and got the errors stated above
In fact, during the installation of WDT,the Eclipse Justplugin is downloaded with JDK 14 ! and the installation changeeclipse .ini!!

-vm
plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932/jre/bin

This makes the problem appear
Changing it back to our own local flavor of AdoptOpenJDK make it work again

[UPDATE 2]
I was wrong, changing the vm back to original did not fix the problem
In eclipse, if I try to install fromwdt-update-site_20.0.0.9.v20200826_1754.zip and uncheck the "Contact all update sites during install to find required software" and, installation fails with this:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Web Development Tools 20.0.900.v20200826_1754 (com.ibm.wdt.webtools.top.feature.feature.group 20.0.900.v20200826_1754)
  Missing requirement: WebSphere® Application Server Liberty Tools 1.0.909.v2020-08-26_1523 (com.ibm.ws.st.core 1.0.909.v2020-08-26_1523) requires 'java.package; com.sun.jdi 0.0.0' but it could not be found
  Cannot satisfy dependency:
    From: Maven tools for Java EE - Core 1.1.605.v20200826_1754 (com.ibm.etools.maven.javaee.core 1.1.605.v20200826_1754)
    To: osgi.bundle; com.ibm.ws.st.core [1.0.710,2.0.0)
  Cannot satisfy dependency:
    From: Maven Tools for Java EE 1.2.0.v20200826_1754 (com.ibm.etools.maven.javaee.feature.feature.group 1.2.0.v20200826_1754)
    To: org.eclipse.equinox.p2.iu; com.ibm.etools.maven.javaee.core [1.1.605.v20200826_1754,1.1.605.v20200826_1754]
  Cannot satisfy dependency:
    From: Java EE Development Tools 1.0.401.v20200826_1754 (com.ibm.wdt.javaee.feature.feature.group 1.0.401.v20200826_1754)
    To: org.eclipse.equinox.p2.iu; com.ibm.etools.maven.javaee.feature.feature.group [1.2.0.v20200826_1754,1.2.0.v20200826_1754]
  Cannot satisfy dependency:
    From: Web Development Tools 20.0.900.v20200826_1754 (com.ibm.wdt.webtools.top.feature.feature.group 20.0.900.v20200826_1754)
    To: org.eclipse.equinox.p2.iu; com.ibm.wdt.javaee.feature.feature.group 1.0.301
@titou10titou10 titou10titou10 changed the title Eclipse 4.17 (2020-09) + wdt-update-site_20.0.0.9.v20200826_1754.zip = Unresolved requirement com.sun.jdi Eclipse v4.17 (2020-09) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" Sep 17, 2020
@NottyCode
Copy link
Member

Eclipse 2020.09 stopped supporting Java SE 11. As a part of that update the org.eclipse.jdt.debug bundle stopped exporting com.sun.jdi package and instead the platform now exports it. On 2020.06 and earlier (when running Java SE 11) it was exported by both the platform and the org.eclipse.jdt.debug bundle. To ensure that WDT used the package from the org.eclipse.jdt.bundle it specified on the package import that it had to come from org.eclipse.jdt.debug. This fails to resolve on 2020.09.

There are some solutions which vary based on goals and complexity.

  1. Removed the bundle-symbolic-name matching attribute from the package import. If this is done it means that the release will only support 2020.09 and newer releases of Eclipse. This may require updates to ensure it cannot be installed on 2020.06 and earlier.
  2. Remove the import package of com.sun.jdi and replace with a Require-Bundle on the org.eclipse.jdt.debug and org.eclipse.core.runtime in that order. This will cause Eclipse to try to load the com.sun.jdi packages from org.eclipse.jdt.debug followed by org.eclipse.core.runtime. On 2020.06 it'll load the package from org.eclipse.jdt.debug and on 2020.09 it'll load them from org.eclipse.core.runtime because it reexports all packages from the platform.
  3. Remove the package from the host bundle and then create a Java SE 8 fragment that adds the import with the bundle-symbolic-name and a Java SE 11 one that doesn't. I'm not 100% sure this approach will work, it might need some modifications.

My gut feel is the best solution is the second one since that allows the current tools to work on 2020.06 and 2020.09. I don't like going to an OSGi anti-pattern, but I don't know of a better solution.

There may be additional challenges running on 2020.09 beyond this one.

@NottyCode
Copy link
Member

I've confirmed that option 2 works for 2020.09

@titou10titou10
Copy link
Contributor Author

titou10titou10 commented Sep 19, 2020

@NottyCode eclipse 2020.09 stopped supporting Java SE 11??? In fact 2020.09 dropped support for Java SE 8 and requires Java SE 11+.....

@titou10titou10
Copy link
Contributor Author

So actually wdt 20.0.0.9 is not compatible (and will never be compatible) with eclipse 2020.09 or is this considered a bug in wdt?

@yeekangc
Copy link
Member

@mattcolegate, can you please look at this issue, PR #408, and handle?

@c-koell
Copy link

c-koell commented Sep 28, 2020

Any news here ?

@vlad-troyan
Copy link

Hi, there is build with the fix, if you want to use liberty with 2020-09 and don't want to wait till this PR will be approved
openlibertytools-20.0.0.9.v2020-10-09_1337-with-fix.zip

@mattcolegate
Copy link
Contributor

Open Liberty Tools has been successfully tested on 2020-09. Now working on testing WDT with that OLT build.

@titou10titou10
Copy link
Contributor Author

@mattcolegate where can we officially download "that OLT build" ? do we have to wait for the next official release of WDT, ie WDT 20.0.0.12 that may come with eclipse 4.18 (2020-12)?

@mattcolegate
Copy link
Contributor

I'm hoping to see a Development Build appear at https://openliberty.io/downloads/#eclipse_developer_tools in the next 24 hours. I'm still looking into how to pull OLT builds into WDT and getting that released out of cycle (new here!)

@c-koell
Copy link

c-koell commented Oct 16, 2020

:-( unfortunately no download has appeared.

@mattcolegate
Copy link
Contributor

:-( indeed. I'll look into it.

@c-koell
Copy link

c-koell commented Oct 23, 2020

Any news here ?

@mattcolegate
Copy link
Contributor

No news - I've been pulled to a higher priority issue but that will be resolved soon and then I can continue working on this. In the meantime (as I don't think it's been mentioned here yet) if you are able to revert to Eclipse 2020-06 or earlier then you will be able to use WDT 20.0.0.9 again, if that helps unblock you.

@bartleyj
Copy link

bartleyj commented Nov 5, 2020

Is there nobody else who can do this for you in the meanwhile?

@mattcolegate
Copy link
Contributor

No, I'm it. They're working on hiring me a colleague (there are supposed to be two of us working on this.)
I have found out that nightly builds that include the fix are available at https://openliberty.io/downloads/#development_builds if you want to try Open Liberty Tools. There's a bit of process to work through to get a WDT build to include a new OLT level which I'm planning on getting done tomorrow.

@cbolik
Copy link

cbolik commented Nov 23, 2020

Installing IBM Liberty Developer Tools from Eclipse Marketplace into a freshly installed Eclipse 2020-09 JEE still fails as of today with "Unresolved requirement: Import-Package: com.sun.jdi" in the log. Do I still need to download that unofficial "with-fix" zip linked to above to use Liberty with Eclipse 2020-09? It looks like PR #408 was merged on Oct 14, so almost 1.5 months ago...

@rdean-csx
Copy link

@mattcolegate Any updates? The link above doesn't show any new nightlies for the Open Liberty Tools since August.

@danno-1
Copy link

danno-1 commented Nov 25, 2020

And Eclipse 2020-12 is available now via Oomph installer. Still no luck with Liberty tools from the marketplace. :-(

@mattcolegate
Copy link
Contributor

Hi, no real updates other than to say I'm still working on it and hoping to have it all released in the next few days. I'll get the 2020-09 support delivered before I start work on 2020-12!

@gleongacc
Copy link

After upgrade to Mac Big Sur, my eclipse UI is problematic. I tried various eclipse versions until 2020-12-R1. The UI problem looks like is resolved. However, liberty is not working on 2020-12-R1. Let me know if you have any testing kits or workaround solution. I am willing to trying it out. Thanks.

@titou10titou10
Copy link
Contributor Author

is there a chance this will be solved and available soon?

@mattcolegate
Copy link
Contributor

As I have been consistently wrong in all my timescales, other than to say I'm still working on getting the release process complete I won't give a definite time for when this will be available. I will however promise to include 2020-12 as part of the testing and let you know if this will fix both releases or just 2020-09. Thank you for your continued patience.

@titou10titou10 titou10titou10 changed the title Eclipse v4.17 (2020-09) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" Eclipse v4.17/v4.18 (2020-[09-12]) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" Dec 17, 2020
@titou10titou10 titou10titou10 changed the title Eclipse v4.17/v4.18 (2020-[09-12]) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" Eclipse v4.17/v4.18 (2020-09/2020-12) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" Dec 17, 2020
@titou10titou10
Copy link
Contributor Author

titou10titou10 commented Dec 17, 2020

Is there a place to manually download a working OL tools for eclipse 2020-12? thx

@titou10titou10
Copy link
Contributor Author

titou10titou10 commented Dec 18, 2020

How to install this plugin in eclipse v4.18/2020-12 before the official release is available:

Get the code:

git clone https://github.com/OpenLiberty/open-liberty-tools.git
git branch integration
cd open-liberty-tools/dev

Edit the"gradle.properties"file to point to eclipse v4.18/2020-12:

# eclipse.sdk.url=http://archive.eclipse.org/eclipse/downloads/drops4/R-4.7.3a-201803300640/eclipse-SDK-4.7.3a-linux-gtk-x86_64.tar.gz
# eclipse.target.platform.url=http://mirror.csclub.uwaterloo.ca/eclipse/technology/epp/downloads/release/oxygen/3a/eclipse-jee-oxygen-3a-linux-gtk-x86_64.tar.gz
eclipse.sdk.url=https://archive.eclipse.org/eclipse/downloads/drops4/R-4.18-202012021800/eclipse-SDK-4.18-linux-gtk-x86_64.tar.gz
eclipse.target.platform.url=http://mirror.csclub.uwaterloo.ca/eclipse/technology/epp/downloads/release/2020-12/202012101200/eclipse-jee-2020-12-R-linux-gtk-x86_64.tar.gz

Build the plugin:

./gradlew

Install the plugin from"ant_build/artifacts/openlibertytools-20.0.0.9.v<build date>.zip"in eclipse v4.18/2020-12 , ie drag and drop the zip file onto the "install software page" in eclipse

At least it works for us so far

@danno-1
Copy link

danno-1 commented Dec 18, 2020

Just wanted to confirm that the fix works on 2020-12! Thank you! Installation was on top of an Eclipse instance that already had the "bad" Liberty Tools installed. It correctly said that it would uninstall that, and install the new. After restart it successfully identified the Liberty Server I had defined when the workspace was built under 2020-06, and it starts and runs like a champ.

Thanks again!

Oh, for those not wanting to do the git / gradle stuff, you can get an already built zip file here
https://github.com/OpenLiberty/open-liberty-tools/files/5367012/openlibertytools-20.0.0.9.v2020-10-09_1337-with-fix.zip

Just point Eclipse installation manager at the folder where you expand the zip file and it will find it (there's a site.xml file in the root folder where you expand the zip).

@l3ender
Copy link

l3ender commented Dec 23, 2020

If the fix is verified, can it be merged and released? Thanks!

@adnangul
Copy link

adnangul commented Jan 4, 2021

Just wanted to confirm that the fix works on 2020-12! Thank you! Installation was on top of an Eclipse instance that already had the "bad" Liberty Tools installed. It correctly said that it would uninstall that, and install the new. After restart it successfully identified the Liberty Server I had defined when the workspace was built under 2020-06, and it starts and runs like a champ.

Thanks again!

Oh, for those not wanting to do the git / gradle stuff, you can get an already built zip file here
https://github.com/OpenLiberty/open-liberty-tools/files/5367012/openlibertytools-20.0.0.9.v2020-10-09_1337-with-fix.zip

Just point Eclipse installation manager at the folder where you expand the zip file and it will find it (there's a site.xml file in the root folder where you expand the zip).

That worked for me, thanks for sharing

@scottkurz
Copy link
Member

scottkurz commented Jan 23, 2021

Thanks for the suggestion of using the fix (https://github.com/OpenLiberty/open-liberty-tools/files/5367012/openlibertytools-20.0.0.9.v2020-10-09_1337-with-fix.zip) , which worked for me on v4.18 (2020-12). A couple quick notes:

  1. I had to uncheck the Liberty Base Docker Tools component. (This, BTW, is an optional element of the Liberty Developer Tools not selected by default there). The Eclipse Install manager helped me realize this so you'd have probably figured it out too but maybe it'll save someone some time. So my install looked like (with the item for the full group, which you can't really tell is the full group selection, unselected as well):

OLT-fix

  1. One difference using the Liberty Developer Tools vs. Open Liberty Tools is that the latter don't seem to give the "Install WebSphere Software" option. I was able to install what I was after (the Java EE Batch tooling) by adding the following update site: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/2020-09_comp/ and browsing around within the contents there.

Hope that helps.

@yeekangc
Copy link
Member

Cc @helena-smith

@BillyD73 BillyD73 self-assigned this Feb 1, 2021
@l3ender
Copy link

l3ender commented Feb 23, 2021

Anything I can assist with to prepare this for release?

@dougbreaux
Copy link

We're still awaiting this being released, yes?

@yeekangc
Copy link
Member

Yes, we are working toward a 21.0.0.3 and looking to release it asap. Truly appreciate everyone's patience.

@titou10titou10 titou10titou10 changed the title Eclipse v4.17/v4.18 (2020-09/2020-12) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" Eclipse v4.17/v4.18/v4.19 (2020-09/2020-12/2021-03) + WDT v20.0.0.9 = Unresolved requirement "com.sun.jdi" Mar 18, 2021
@abdulaleem13
Copy link

Eclipse IDE 2021-03 R Packages (Windows x86_64)

openlibertytools-20.0.0.12.v2021-03-18_2322.zip

@weckel
Copy link

weckel commented Mar 19, 2021

Eclipse IDE 2021-03 R Packages (Windows x86_64)

openlibertytools-20.0.0.12.v2021-03-18_2322.zip

Thanks.
Installing this with the newest Eclipse worked for me.

@BillyD73
Copy link
Collaborator

Hi everybody - thank you so much for your patience and please accept my sincere apologies for the delays involved with this release. I am delighted to announce that WDT 21.0.0.3 is now available on the Eclipse Marketplace (https://marketplace.eclipse.org/content/ibm-liberty-developer-tools). FYI we do have a known issues page here: https://github.com/OpenLiberty/open-liberty-tools/wiki/Liberty-Tools-21.0.0.3-known-issues.

@arjantijms
Copy link

After a very quick test, it seems we still get the exact same error when running on JDK 15+. Incidentally, this is the JDK that's shipped with Eclipse in some versions.

@dbarfield
Copy link
Contributor

dbarfield commented Jul 12, 2021

@dbarfield
Copy link
Contributor

dbarfield commented Jul 13, 2021

@arjantijms when you tested on eclipse 2021-03 with its shipped JDK 15+ did you also tests with WDT 21.0.0.3 or were you still using WDT 20.0.0.9 (as the fix for this went into WDT 21.0.0.3) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests