biz.aQute.tester - unresolved requirement

Hello,

in my application, which is quite comprehensive, I have replaced the embedded javax http server with the jetty server (felix). Now I get an error message while running (not testing):

  • ! could not resolve the bundles: [biz.aQute.tester-7.0.0.202308090142-SNAPSHOT org.osgi.framework.BundleException: Could not resolve module: biz.aQute.tester [53]*
  • Unresolved requirement: Import-Package: aQute.bnd.build; version=“[4.5.0,5.0.0)”; resolution:=“optional”*
  • Unresolved requirement: Import-Package: aQute.bnd.service; version=“[4.8.0,5.0.0)”; resolution:=“optional”*
  • Unresolved requirement: Import package: junit.framework; version=“[3.8.0,5.0.0)”*

So it should have happened through the exchange or through the latest bnd-tools update.

In general, how can I get to the bottom of such error messages that have no (visible) references to my classes?
I am using Java 20 ([64]).

bnd.bnd
org.apache.felix.http.jetty;version=latest,
org.apache.felix.http.servlet-api;version=latest

manifest:
org.eclipse.jetty.http;version=“[9.4,10)”,
org.eclipse.jetty.server;version=“[9.4,10)”,
org.eclipse.jetty.server.handler;version=“[9.4,10)”,
org.eclipse.jetty.util.resource;version=“[9.4,10)”,
org.eclipse.jetty.util.ssl;version="[9.4,10)

Greetings
Arvid

Sorry, but five people read the question and no one can comment!?

Is the question too unspecific or is there still information missing?
I am an OSGI user and not an OSGI expert!!!

Please write what you think and don’t leave me ‘out in the rain’ (German proverb)!

Greetings
Arvid

The information you provide seems to indicate you’re pretty lost. OSGi is a fantastic technology but it requires you to understand the basics, it is not a magic sauce.

It might help to describe what your build environment is. bnd is used in lots of wildly different setups. Sharing a workspace to look at might be useful.

@pkriens
Dear Mr. Kriens, first of all, thank you for answering me.
I have to make it clear that I think developing OSGI is the best thing that could have happened to Java!
I also chose OSGI for my private project because I had to use some at least strange techniques in the companies I worked for.

You wrote the following in the post ‘The end on an era’: “Further, I am convinced that many/most developers are lazy and prefer a quick hack or magic sauce over true thorough software engineering.”
That is how I see it too! I find it all the worse that you wrote that to me too (But yes, I’m lost).
That reminds me of a pastor who insults his people in church that no one goes to church anymore!

But enough about that, let’s get back to my problem.
I asked what you answered: what information is still missing.
Of course I can’t and don’t want to publish the entire project (hundreds of classes in over 120 bundles).

As I said before, I have two concerns:

  1. I don’t understand what the ‘biz.aQute.tester’ bundle has to do with my application’s run. I understand compiling issues when my bundles are involved. But here, error messages suddenly appeared in the run, coming from other libraries. I think the problem lies with them. And that brings us to the second question:

  2. How can I get to the bottom of error messages that are so detached from my knowledge.
    In order for me to be able to search at all, I’d need some sort of full ‘stacktrace’ of the error message!

I’m more concerned here with an opinion or assessment of those who were involved in the development of ‘biz.aQute.tester’.
So maybe you know of cases where this error message occurred.
Of course I can find out with my skills.
It is a matter of time! But I prefer to ask a specialist first!

Greetings
Arvid

P.S.: It wasn’t the bnd-tools update!
With the ‘com.sun.net.httpserver.HttpsServer’ I don’t have this error!

I am one of the other viewers who didn’t reply. There is simply not enough info for helping you to fix it. Either you supply the requested info or fix it yourself. :wink:

I am not the pastor …

I think OSGi is a great technology that, when applied properly, is a huge boon to productivity. However, it does require work to understand it. Looking at the little information you provide, I expect it will take a few days to get you organized. I can provide that kind of consultancy if you want.

As always, if you provide a small repo on github with the problems, you’ll find lots of volunteers to take a look and help you. Now there just isn’t enough info to know where to get started.

1 Like

Those Unresolved requirement errors are cumbersome to resolve sometimes. Probably jetty is requiring a dependency you currently don’t have.

Here are some pointers from my environment:

central.maven:

org.apache.felix:org.apache.felix.http.jetty:4.2.14
org.apache.felix:org.apache.felix.http.servlet-api:2.1.0

myapp.bndrun:

-runbundles: \
org.apache.felix.http.jetty;version='4.2.14',\
org.apache.felix.http.servlet-api;version='2.1.0'

I do not have any references to jetty in bnd.bnd files.
Using bnd-workspace model, Bndtools 6.4.0 in Eclipse, Java 17.

@pkriens
Thank you for your offer to help!!! That thing about the pastor wasn’t meant to be taken seriously, like the rest of it! It’s just stupid when you ask a question and nobody writes anything about it. That you wrote that you didn’t have enough information was exactly right!
I have OSGI, at least as I have configured it for myself, so far quite well under control. At least as long as nothing fundamental changes with an update. For help, I have only this forum!

Well, the error to question 1) was very stupid! At least I found it very quickly. The answer to my question would have been: “Is your application running in a test environment?” Somehow I entered under “OSGI Framework JUnit Tests” in the eclipse run configuration. I haven’t noticed it until now as I’ve never had a problem!

And to 2): As chrisrueger wrote above, it’s just not that easy to find these unresolved requirements! I was lucky with my error and solution!

@chrisrueger:
I probably have the information in the bnd.bnd because it is a factory and is in its own eclipse workspace.

However, the error may still show up in a JUnit test. I still have to catch it up ;-(

1 Like