Skip to content

Fix Eclipse IDE setup - #1803

Merged
wborn merged 1 commit into
openhab:mainfrom
Nadahar:fix-eclipse-setup
Sep 7, 2025
Merged

Fix Eclipse IDE setup#1803
wborn merged 1 commit into
openhab:mainfrom
Nadahar:fix-eclipse-setup

Conversation

@Nadahar

@Nadahar Nadahar commented Sep 6, 2025

Copy link
Copy Markdown
Contributor

Ever since bndtools 7.1.0 was released, OH's Eclipse setup has been broken. The problem has been identified, but they haven't released a patched version, so the fix won't arrive until 7.2.0. However, a snapshot version of 7.2.0 exists, but it has a different problem which still breaks things.

So, until this changes, it seems the best approach is to lock bndtools to 7.0.0 until a newer working version exists.

I made this several months ago, and no longer remember why org.eclipse.m2e.feature.feature.group was removed, but this has been tested by me and quite a few others and seems to work like it is. I had a post on the forum that people have used to install Eclipse in the meanwhile, and as far as I know, this has resolved the problem for all that have used it. Now however, the links in the forum post are all dead (both to the setup file itself and to the screenshots explaining how to use it), so that's no longer an option, and I figure it's time to make this "temporary permanent".

See this thread for some of the related problems reported.

Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
@Nadahar
Nadahar requested a review from a team as a code owner September 6, 2025 13:44
@openhab-bot

Copy link
Copy Markdown
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/osgi-resolve-gives-error/160641/34

@lolodomo

lolodomo commented Sep 6, 2025

Copy link
Copy Markdown
Contributor

Look at my comment in the community forum, looks like it does not work with that updated file in Linux (Mint).

@Nadahar

Nadahar commented Sep 6, 2025

Copy link
Copy Markdown
Contributor Author

Look at my comment in the community forum, looks like it does not work with that updated file in Linux (Mint).

@lolodomo There must be something else going wrong. I have tested it for installations for Linux, macOS and Windows (on VMs). Also, if you look at the changes I've made, I haven't "removed" any project from the file.

@Nadahar

Nadahar commented Sep 7, 2025

Copy link
Copy Markdown
Contributor Author

@lolodomo I've just tested the setup file on Mint 20.3, and it works just fine as far as I can see

Eclipse installer 2

@lolodomo

lolodomo commented Sep 7, 2025

Copy link
Copy Markdown
Contributor

Ok so I am certainly very stupid and I don't understand how to provide this file ?
Is it in the window you show in the message just before ? By clicking on the green "+" icon ?

@lolodomo

lolodomo commented Sep 7, 2025

Copy link
Copy Markdown
Contributor

Is it a file I could replace somewhere in the "eclipse installer" folder so that I don't have to select it ?

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lolodomo

lolodomo commented Sep 7, 2025

Copy link
Copy Markdown
Contributor

@wborn : the documentation page ( https://www.openhab.org/docs/developer/ide/eclipse.html ) points to this page to download the Eclipse installer: https://wiki.eclipse.org/Eclipse_Installer
Will the page be automatically updated ?
I am using the "Linux 64 bit" link.

Unfortunately I am constrained to wait for this update to setup a Eclipse environment for openHAB on my new Linux Mint OS as I am not succeeding to setup the Eclipse installer to use the openHAB2.setup file provided by this PR.

@wborn
wborn merged commit c630299 into openhab:main Sep 7, 2025
2 checks passed
@wborn

wborn commented Sep 7, 2025

Copy link
Copy Markdown
Member

Yes Eclipse uses the updated file in this PR @lolodomo. Can you give it a try now it's merged?

@wborn wborn added this to the 5.1 milestone Sep 7, 2025
@Nadahar
Nadahar deleted the fix-eclipse-setup branch September 7, 2025 15:44
@Nadahar

Nadahar commented Sep 7, 2025

Copy link
Copy Markdown
Contributor Author

@lolodomo Did you finally get this to work now?

@lolodomo

lolodomo commented Sep 7, 2025

Copy link
Copy Markdown
Contributor

It works for me now, just following the instructions in the documentation.
Great fix.

@Nadahar

Nadahar commented Sep 7, 2025

Copy link
Copy Markdown
Contributor Author

Is it a file I could replace somewhere in the "eclipse installer" folder so that I don't have to select it ?

Sorry, I didn't see this comment before, but no: The installer fetches the file online directly from GitHub as far as I understand.

@holgerfriedrich

Copy link
Copy Markdown
Member

Could you pls. check if new 7.2.0 works for you?

@Nadahar

Nadahar commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

Could you pls. check if new 7.2.0 works for you?

I don't know who "you" refers to, but if it's me, I'm very reluctant to spend lots of hours struggling just because some new version is out. Generally, I never upgrade unless there's a reason to, because life is just too short to struggle with everything that breaks in this volatile world, and I especially don't want to be among "first adopters" since then I probably can't lean on other people's experiences when there's a problem.

What I know is that people who have tested the 7.2.0 snapshot has reported that while the particular issue that was broken in 7.1.0 had been fixed, but that there was another one still preventing OH from working with 7.2.0. If this has been fixed in the final version is anybody's guess, but I wouldn't hold my breath.

I can do some testing on a VM, but so can anyone basically, and I don't have time for that right now.

@holgerfriedrich

Copy link
Copy Markdown
Member

To give some context, I am currently evaluating the new 7.2 release for core. Mainly it removes the blocker running the itests with JDK 25, namely the call to the no longer supported function setPolicy(). An yes, it comes with the downside that JUnit (and transtively Mockito) have been constrained due to a known issue we had worked around before. This would require a downgrade of those dependencies or some sophisticated overwriting / repackaging / etc of bndtools.

As I don't use Eclipse and have not been affected by the bug above, I thought it could be easy to test for one of the involved developers. I can't even tell if it is a risk that we use 7.0 here and 7.2 in core.

@Nadahar

Nadahar commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

I understand. While testing this specific issue is relatively easy, because it won't run at all when the bug is present, it means creating or cloning a VM, running the OH Eclipse installation, cloning all repos and a lot of building. After all that, it's just to try to run the "demo app" and see if it works. But, even if that particular thing works, how can you know that something else hasn't broken?

The fact that the bug in 7.1 was discovered shortly after release, the developers themselves were quite shocked how this bug could have "slipped by" and ended up in a release, no patch release was done, and it has been around a year of waiting. In the meanwhile, people have had to try to use the snapshot, which has been broken in other ways. This doesn't give me a lot of confidence in their "release process", it seems like you have to consider yourself pretty lucky if you have a working setup.

So, given a couple of hours messing around with a VM, I could confirm whether 7.2.0 actually allows the "demo app" to resolve - but I'd have no idea of what other subtle bugs might lurk around. I think it would be better if some adventurous soul manually upgraded their BndTools to 7.2.0 in the Eclipse they use, and gained some experience whether it actually works. But, I'm a bad candidate for this, since I have a lot of bundles open, both from addons, core and webui. This makes rebuild operations extremely time-consuming at times (not always, but when it "really gets out of sync", which it typically does when BndTools acts up). As such, somebody that works a bit more focused, for example only with a few add-ons, would be in a much better position to do such experiments, because rebuilds will probably take minutes, not hours.

We've been using 7.1 in Core for a while, and it doesn't seem like that has lead to any conflict with using BndTools 7.0 in Eclipse, but of course, you never know.

Maybe it would be best to ask for some guinea pigs on the forum?

@Nadahar

Nadahar commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

If you have a branch where you've upgraded core to 7.2, I could try to check out and build that with my 7.0 setup. That could give an indication as to whether the Eclipse version and the Core version conflicts or not.

@Nadahar

Nadahar commented Jan 4, 2026

Copy link
Copy Markdown
Contributor Author

I took a snapshot of a Linux VM where I have OH-Eclipse set up and working last night, and then upgraded Eclipse to latest and BndTools to 7.2. My first attempt to resolve was successful, but it should be noted that I had made no changes at this point, and the "solution" was already resolved from 7.0 - so I suspect that's why it worked. I then did some changes to what bundles to include and tried to resolve again, but it failed. And it failed whatever I did, also when I undid the changes to the bundles, so that it was back to what it originally was.

The failure is different from a "real failure"; as there is no "real information" about what's wrong. The error isn't the same as with 7.1 (project is null). It complains about being unable to resolve org.eclipse.equinox.metatype, very similar to this: https://community.openhab.org/t/eclipse-resolution-problem-after-update-from-git/128421

I have never seen that error with 7.0, so I'm pretty sure that it's related to 7.2, and might be the very problem that others reported with the 7.2 snapshot. That said, it might be that it's possible to solve whatever is causing it - I don't know. I tried various things to no avail, and was stupid enough (I was tired) to be led to delete the contents of ~/.p2. That was a mistake of course, because it basically deleted Eclipse. So, I had to revert to the snapshot, and now the VM is back in its working state - but it also means that I must do all the upgrading again to get to the point where I see the error.

I generally know too little about the mysterious workings of Bnd to solve such issues. They can be extremely frustrating because it just feels like you're left with far too little information to work with to actually get somewhere.

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

Successfully merging this pull request may close these issues.

5 participants