Dear Maurice, Thanks for your help. I found the problems: 1) I was using Java 17, while Karaf runs on Java 11 (clearly advertised but overlooked by me) 2) Code that used from someone else used stuff from jdk.internal. You can not see this by searching for the namespace. The tool jdeps was helpful here.
Best, -- Jaap > -----Original Message----- > From: Maurice Betzel <[email protected]> > Sent: vrijdag 2 december 2022 09:39 > To: [email protected] > Subject: RE: import java.lang.runtime: WARNING - unable to find matching > export - How to solve > > Hi Jaap, > > That one I have not seen yet either 😊. > Look at the manifest of the bundle, it lists the details of what makes a jar a > bundle. > If you use the maven bundle plugin or the bnd one, keep in mind it only > analyses the imperative code for generating the im- and exports. > Any declarative declared dependencies must be manually declared with the > plugin. > Any imported package must of course also have a bundle exporting the > needed package. > There are also several Karaf CLI bundle commands that can help you. > Type bundle: and press <TAB> to get al list with there explanations. > > ICYMI: > > https://github.com/apache/karaf/tree/main/examples > > And in particular > > https://github.com/apache/karaf/tree/main/examples/karaf-bundle- > example > > > Met vriendelijke groet / Mit freundlichen Grüßen / Kind regards, > > Maurice Betzel > Principal Software Engineer > Gaston Schul Group > > -----Original Message----- > From: Jaap Gordijn <[email protected]> > Sent: 01 December 2022 21:50 > To: [email protected] > Subject: import java.lang.runtime: WARNING - unable to find matching > export - How to solve > > CAUTION: This email originated from outside of Gaston Schul. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Dear all, > > I am starting with Apache Karaf/OSGI, and I have created my first bundles. > > Now I have the following unresolved dependency: > > import java.lang.runtime: WARNING - unable to find matching export > > My question is: how do I debug this, e.g. find where this dependency is > required. > I do not use it explicitly in my code. > > Thanks for your help. > > -- Jaap > > Al onze verrichtingen geschieden op basis van de Algemene voorwaarden > der Expediteurs van België, gepubliceerd in de bijlage tot het Belgisch > Staatsblad dd. 24 juni 2005 onder nr. 0090237. De tekst van deze > voorwaarden wordt op uw verzoek gratis toegezonden. > All our transactions are subject to the General Conditions of the Belgian > Forwarders Association which have been published under nr. 0090237 in the > "Bijlage tot het Belgisch Staatsblad" dated June 24th, 2005, and is available > free of charge upon request. > Toutes nos opérations se font sur base des Conditions Générales des > Expéditeurs de Belgique. Le texte en a été publié dans l' Annexe au Moniteur > Belge du 24 juin 2005 sous le n° 0090237. Ce texte sera vous envoyé > gratuitment sur demande. > Email confidentiality notice: > This email and any files transmitted with it are confidential and intended > only > for the use of the recipient. If you have received this email in error please > notify its sender.
