Hi,

The error is actually coming from the blueprint extender. Your bundle b 
contains a file named OSGI-INF/blueprint/blueprint.xml

This file contains some service reference (to a service implementing 
xyz.JaxRsEventAdapter) and these are not resolved. You should look into the 
blueprint.xml if this service reference is necessary and if yes, you need a 
service implementation that is implementing this interface and exposing it as 
an OSGi service. The blueprint extender parses the blueprint.xml and will wait 
for five minutes for the service reference to become resolved. Then it throws 
this timeout exception.

Best regards
Stephan

From: Onder SEZGIN <ondersez...@gmail.com>
Sent: Thursday, 6 July 2023 07:02
To: user@karaf.apache.org
Subject: Re: karaf newbie question.

Hi,

there you go,

please note that the class in subject is in  abc.core.jaxrsadapter package.

both manifests,

a-common (251)
----------------
Bnd-LastModified = 1688597094984
Build-Jdk = 1.8.0_372
Built-By = abc
Created-By = Apache Maven Bundle Plugin
Manifest-Version = 1.0
Tool = Bnd-3.5.0.201709291849

Bundle-ManifestVersion = 2
Bundle-Name = a-common
Bundle-SymbolicName = a-common
Bundle-Version = 1.11.2

Require-Capability =
osgi.ee<http://osgi.ee/>;filter:=(&(osgi.ee<http://osgi.ee/>=JavaSE)(version=1.8))

Export-Package =
abc.core.jaxrsadapter;uses:=org.apache.cxf.message;version=1.11.2,
abc.tfc.common.audit;uses:="javax.ws.rs.ext,abc.core.jaxrsadapter,org.apache.cxf.interceptor,org.apache.cxf.message,org.apache.cxf.phase";version=1.11.2,
abc.tfc.common.cxf;uses:=org.apache.cxf.feature;version=1.11.2
Import-Package =
javax.ws.rs.ext;version="[2.1,3)",
org.apache.cxf.feature;version="[3.3,4)",
org.apache.cxf.interceptor;version="[3.3,4)",
org.apache.cxf.message;version="[3.3,4)",
org.apache.cxf.phase;version="[3.3,4)",
org.slf4j;version="[1.7,2)",
javax.ws.rs<http://javax.ws.rs/>;version="[2.1,3)",
javax.ws.rs.core;version="[2.1,3)"
Private-Package =
abc.core.jaxrsadapter,
abc.tfc.common.audit,
abc.tfc.common.cxf



b-bundle (252)
---------------------
Bnd-LastModified = 1688597081657
Build-Jdk = 1.8.0_372
Built-By = abc
Created-By = Apache Maven Bundle Plugin
Include-Resource = 
OSGI-INF/blueprint/blueprint.xml=src/main/resources/OSGI-INF/blueprint/blueprint.xml
Manifest-Version = 1.0
Tool = Bnd-3.5.0.201709291849

Bundle-Blueprint = OSGI-INF/blueprint/blueprint.xml
Bundle-ManifestVersion = 2
Bundle-Name = b-bundle
Bundle-SymbolicName = b-bundle
Bundle-Version = 1.11.2

Require-Capability =
osgi.ee<http://osgi.ee/>;filter:=(&(osgi.ee<http://osgi.ee/>=JavaSE)(version=1.8))

Export-Package =
abc.tfc.exception;version=1.11.2,
abc.tfc;uses:="javax.ws.rs<http://javax.ws.rs/>,javax.ws.rs.core";version=1.11.2,
abc.tfc.processors;uses:=org.apache.camel;version=1.11.2,
abc.tfc.routes;uses:="abc.tfc.processors,org.apache.camel,org.apache.camel.builder,org.slf4j";version=1.11.2
Import-Package =
org.apache.activemq,
org.apache.activemq.camel.component;version="[5.9,6)",
org.apache.activemq.pool,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
com.fasterxml.jackson.jaxrs.json;version="[2.12,3)",
org.apache.camel;version="[2.23,3)",
org.apache.camel.builder;version="[2.23,3)",
org.apache.camel.model;version="[2.23,3)",
abc.core.jaxrsadapter;resolution:=optional,
abc.tfc.common.audit;resolution:=optional,
abc.tfc.common.cxf;resolution:=optional,
javax.ws.rs<http://javax.ws.rs/>;version="[2.1,3)",
javax.ws.rs.core;version="[2.1,3)",
org.apache.cxf.message;version="[3.3,4)",
org.slf4j;version="[1.7,2)",
javax.jms;version="[1.1,2)",
org.osgi.service.cm<http://org.osgi.service.cm/>;version="[1.4,2)",
org.apache.camel.blueprint;version="[2.12.0,3)",
org.apache.camel.component.cxf.common.message;version="[2.23,3)",
org.apache.camel.model.dataformat;version="[2.23,3)",
javax.ws.rs.ext;version="[2.1,3)",
org.apache.cxf.feature;version="[3.3,4)",
org.apache.cxf.interceptor;version="[3.3,4)",
org.apache.cxf.phase;version="[3.3,4)"
Private-Package =
abc.core.jaxrsadapter,
abc.tfc.common.audit,
abc.tfc.common.cxf

On Thu, Jul 6, 2023 at 5:35 AM Jean-Baptiste Onofré 
<j...@nanthrax.net<mailto:j...@nanthrax.net>> wrote:
Hi,

I would need the full trace but it seems the problem is not about the
import/export packages, but more about a service requirement.
It seems your bundle MANIFEST contains a required service
(JaxRsEventAdapter) but no bundle provides this capability.

I would suggest to check your headers (and eventually remove the
require service header).

Regards
JB

On Thu, Jul 6, 2023 at 6:20 AM Onder SEZGIN 
<ondersez...@gmail.com<mailto:ondersez...@gmail.com>> wrote:
>
> OK i am not very to karaf, i hadjust not gone beyond experimenting except 
> recent times.
> i have 3 repositories.
>
> one of them if called a-common bundle.
>
> it basically imports packages of dependency and since i dont specify anything 
> extra, it exports its packages as expected.
>
> this bundle is imported by another bundle called b-bundle let's say.
>
> for some reason, the package is getting exported twice
>
> there is no explicit export of a-common in b-bundle.
>
> admin@root()> bundle:classes | grep -i jaxrseve
> 251 | xyz.JaxRsEventAdapter.class | exported: true
> 252 | xyz.JaxRsEventAdapter.class | exported: false
> 254 | xyz.JaxRsEventAdapter.class | exported: false
>
>
> ---------------------
> Status: Failure
> Blueprint
> 7/5/23 10:53 PM
> Exception:
> null
> java.util.concurrent.TimeoutException
> at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:393)
> at 
> org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:45)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:750)
>
> Missing dependencies:
> (objectClass=xyz.JaxRsEventAdapter)
> Declarative Services
>
> i have tried quite a lot of combinations.
> couldn't yet come up with proper solution even though the problem sounds 
> awful easy.
>
>   Any idea is appreciated.
>

Reply via email to