It is difficult to interpret sometimes. From what I see, you have a dependency problem with io.openems.edge.bridge.modbus. It looks like it can’t find io.openems.edge.common.channel. As there is no bundle io.openems.edge.common.channel you are missing the bundle io.openems.edge.common or the correct version number of the bundle or there is no package or an inconsistent package io.openems.edge.common.channel in it.
You can ignore the package osgi.wiring.package. I assume this is the package name of the package which dumps the error.
Update: Each bundle has a generated folder in it. You may look there, if you find the jar file (in your case io.openems.edge.common/generated/io.openems.edge.common.jar.
If the file exists, please have a look into the jar file. You can simply unzip it. Within the folder structure of the unzipped file there should be a package io.openems.edge.common.channel. Hope this helps.
That helps a lot already.
You are saying bridge-modbus is missing common.channel or the correct version of it.
And wiring.package is not the problem, but just issuing the error.
I will check the jar files and versions as you said and report back.
Good to see that your sources are there. And now you should
check if the compliled jar package is there. It should look like that:
Please delete the file within your file explorer. Rebuild the project and check if the file is rebuild and if the timestamp was updated.
check if the library is used by the modbus bridge
If everything is there (above arrow points to the library, second arrow points to the channel package) and you do not have compiler errors in Eclipse, then the problem is within your EdgeApp.bndrun. I would suggest using the one from the official repository.
Also I see, that you are using Java 11. You should switch to Java 17 and rebuild everything. Note that Java 17 is the officially supporterd version.
I rebuilt edge.common.jar and also bridge.modbus.jar successfully.
But the usage as indicated by your red arrows was not shown.
Then I decided to clean the entire project and ended up with a bunch of red exclamation marks on all bundle icons. I thinks this is a build-path/dependency problem.
Now I cannot rebuild the project, the OSGI framework selection box is empty and the resolver is showing many more unresolved dependencies.
I hate bndtools and osgi very much now. Or maybe I’m hating eclipse - I don’t even know.
How can I even build a single bundle? is it F5/update?
20 years of experience as a programmer (not java) and I cannot even find out how to rebuild a single bundle in eclipse. What a terrible IDE.
This is well… a very common statement. I can leave you with some thoughts on it. First - an approach which works without IDE tooling and discussion about migrating away from Tycho (Eclipse PDE) within openHAB/Eclipse SmartHome projects. Fair - I took a part in both of these, so its a bit of self promotion (sorry!) but I understand your point very well. The worst thing might happen to developer is when tool doesn’t work and you are left in doubt how to fix it.
Bndtools is a lot better than Tycho but it still might face troubles under certain conditions. I don’t know them exactly but bndtools itself attempts to create its own workspace within Eclipse where it is able to compute everything and make sure that application will launch. Second recording I linked includes bndtools author and maintainer who understood issue OSGi brought to Eclipse SmartHome and openHAB as well.
Probably it does not solve your issue at all, but be sure that you are not alone with your feelings.
Till now I have always been able to solve these kind of Eclipse IDE + bndtools problems with these steps:
If you add your own new bundle and are unsure about the Classpath files, etc., I recommend to run the tools/prepare-commit.sh script (e.g. in a Windows Subsystem for Linux environment).