Is there a console command that can list where a bundle is loaded from?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a console command that can list where a bundle is loaded from?

Steinar Bang
Is there a console command that can be used to find out what repository
a particular bundle was loaded from?

I tried bundle:info, which looked promising, but the bundle:info command
outputs almost nothing on my bundles:

 karaf@root()> bundle:info 137

 Ukelonn webapp OSGi bundle (137)
 --------------------------------
 karaf@root()> bundle:info 59

 Ukelonn webapp PostgreSQL database connection OSGi bundle (59)
 --------------------------------------------------------------
 karaf@root()>

Reply | Threaded
Open this post in threaded view
|

Re: Is there a console command that can list where a bundle is loaded from?

jbonofre
la -l (l for location).

Regards
JB

On 08/31/2017 04:28 PM, Steinar Bang wrote:

> Is there a console command that can be used to find out what repository
> a particular bundle was loaded from?
>
> I tried bundle:info, which looked promising, but the bundle:info command
> outputs almost nothing on my bundles:
>
>   karaf@root()> bundle:info 137
>
>   Ukelonn webapp OSGi bundle (137)
>   --------------------------------
>   karaf@root()> bundle:info 59
>
>   Ukelonn webapp PostgreSQL database connection OSGi bundle (59)
>   --------------------------------------------------------------
>   karaf@root()>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Is there a console command that can list where a bundle is loaded from?

Steinar Bang
>>>>> Jean-Baptiste Onofré <[hidden email]>:

> la -l (l for location).

Thanks, but that lists the mvn URLs, and not the maven repositor the
bundle was loaded from, which is what I was looking for.

But what maven repo a particular bundle was loaded from may not the
available, because it isn't saved by karaf?

Reply | Threaded
Open this post in threaded view
|

Re: Is there a console command that can list where a bundle is loaded from?

jbonofre
Hi,

We don't store the repository, only the location.

You can have the repository only if the location url contains it.

Regards
JB

On 09/01/2017 11:55 PM, Steinar Bang wrote:

>>>>>> Jean-Baptiste Onofré <[hidden email]>:
>
>> la -l (l for location).
>
> Thanks, but that lists the mvn URLs, and not the maven repositor the
> bundle was loaded from, which is what I was looking for.
>
> But what maven repo a particular bundle was loaded from may not the
> available, because it isn't saved by karaf?
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Is there a console command that can list where a bundle is loaded from?

Steinar Bang
>>>>> Jean-Baptiste Onofré <[hidden email]>:

> We don't store the repository, only the location.

> You can have the repository only if the location url contains it.

Ah, OK.

I wanted the path for debugging to see if my customization of
org.ops4j.pax.url.mvn.repositories was correct:
 config:edit org.ops4j.pax.url.mvn
 config:property-append org.ops4j.pax.url.mvn.repositories ", file:///var/www-maven/repository/@snapshots, http://maven.vaadin.com/vaadin-addons"
 config:property-set org.ops4j.pax.url.mvn.globalUpdatePolicy always
 config:update

I just wanted to assure myself that I was loading the bundles from the
correct location, that I had written the path correctly and that the
path was readable for the user karaf was running under, and that I
wasn't fooling myself and loading old versions of the bundles from
somewhere else.

Is there some logging that can be switched on to debug something like
this?

(As it turns out, I was loading the bundles from the correct place, but
the issue may rise again)