You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by matteo <ma...@gmail.com> on 2015/12/08 01:41:34 UTC

CXF 3.1.4 bundles remain in starting state

I'm trying to migrate to cxf 3.1.4 from 3.1.2 but I'm somehow blocked. This
is my OSGi runtime in CXF 3.1.2 (which is working fine):



And this is what I get if I switch to 3.1.4:


All cxf bundles remain in starting state forever. No error, no strange
messages, nothing.

I'm using a bndtools bndrun file (bndtools v.3.0.0), java 8.

Any ideas?

By the way, this is more or less the same old story whenever I have to
migrate from cxf version x to cxf  version y in OSGi: hours (if not days) of
pure pain. Obviously I'm doing something wrong: what is the recommended
approach to automatically get either a launch configuration or a bndrun file
for cxf+OSGi out of the cxf distribution?

Thanks!
matteo



-----
matteo
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 3.1.4 bundles remain in starting state

Posted by Christian Schneider <ch...@die-schneider.net>.
I also do not fully understand it.

As far as I understood, equinox will at least start the lazy bundles if 
any of their classes are used. Apparently it does not start bundles at 
all if the flag is missing.
Not sure if this is really accurate though.

Christian

On 09.12.2015 15:04, matteo wrote:
> Ok, I managed to find a way out. It is enough to use the caffeine bundle
> (https://github.com/bndtools/bndtools-rt/tree/master/org.bndtools.rt.caffeine)
> to force the lazy bundles to start.
>
> It is sort of hack but it has advantages:
> - It does not create dependencies or couplings between CXF bundles and the
> other runtime bundles
> - It does not require to modify the existing bundles that worked in versions
> < 3.1.4
>
> Honestly I still don't understand why the Bundle-ActivationPolicy: lazy has
> been introduced.
>
> m
>
>
>
> -----
> matteo
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687p5763746.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: CXF 3.1.4 bundles remain in starting state

Posted by matteo <ma...@gmail.com>.
Ok, I managed to find a way out. It is enough to use the caffeine bundle
(https://github.com/bndtools/bndtools-rt/tree/master/org.bndtools.rt.caffeine)
to force the lazy bundles to start.

It is sort of hack but it has advantages:
- It does not create dependencies or couplings between CXF bundles and the
other runtime bundles
- It does not require to modify the existing bundles that worked in versions
< 3.1.4

Honestly I still don't understand why the Bundle-ActivationPolicy: lazy has
been introduced.

m



-----
matteo
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687p5763746.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 3.1.4 bundles remain in starting state

Posted by Christian Schneider <ch...@die-schneider.net>.
Yes .. your problem with the starting state might be a CXF problem.
I think I had a similar problem with the launcher basically I needed to 
start the at leastr one CXF top level bundle by hand.

I am not sure how to solve this though. Maybe you can also ask in the 
bndtools user list how to handle such case. We might need to fix it in CXF
but I am not sure about how to approach it.

Christian

On 08.12.2015 23:15, matteo wrote:
> Hi Christian,
> Thank you for the response. Yes, the bnd-maven-plugin will help a lot and
> I'm really looking forward its release. But in this case I'm not sure the
> problem is due to some missing dependencies.
>
> I saw your comments to  CXF-6687
> <https://issues.apache.org/jira/browse/CXF-6687>  : you mentioned it was a
> problem in the Karaf launcher but you also said that you were able to
> reproduce the issue when trying CXF with bndtools. What was your impression
> in this case? A similar problem in the aQute.launcher.Launcher?
>
> The STARTING description in OGSi says that /If the bundle has a lazy
> activation policy, then the bundle may remain in this state for some time
> until the activation is triggered./ /Triggered/ seems a synonym of /first
> class load from the bundle occurs/: probably the blueprint endpoint
> configuration I'm using does not trigger the the cxf bundles activation?
>
> matteo
>
>
>
> -----
> matteo
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687p5763731.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: CXF 3.1.4 bundles remain in starting state

Posted by matteo <ma...@gmail.com>.
Hi Christian,
Thank you for the response. Yes, the bnd-maven-plugin will help a lot and
I'm really looking forward its release. But in this case I'm not sure the
problem is due to some missing dependencies.

I saw your comments to  CXF-6687
<https://issues.apache.org/jira/browse/CXF-6687>  : you mentioned it was a
problem in the Karaf launcher but you also said that you were able to
reproduce the issue when trying CXF with bndtools. What was your impression
in this case? A similar problem in the aQute.launcher.Launcher?

The STARTING description in OGSi says that /If the bundle has a lazy
activation policy, then the bundle may remain in this state for some time
until the activation is triggered./ /Triggered/ seems a synonym of /first
class load from the bundle occurs/: probably the blueprint endpoint
configuration I'm using does not trigger the the cxf bundles activation?

matteo



-----
matteo
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687p5763731.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 3.1.4 bundles remain in starting state

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Matteo,

as soon as there is a release of the maven-indexer-plugin I will add the 
index creation to the CXF build.
Then you at least have a nice index of all CXF bundles + dependencies. 
This should help with creating a bndrun file.

I recently tried to create such an index using the plugin and it was 
rather easy to get CXF to start.
My run file did not cover replacing the JDK APIs and Impls that karaf 
replaces but at least with a recent Java version that did not seem to be 
a problem.

If you want you can create an issue for adding the index to CXF then you 
can follow the progress.

Christian

On 08.12.2015 10:23, matteo wrote:
> Thanks, it seems so, at least in terms of effects. Unfortunately, I'm not
> using Karaf right now: just Equinox.
> Is anybody using bare OSGi/Equinox + CXF 3.1.4 and experiencing a similar
> problem?
>
> By the way, it seems that my second question becomes more relevant: is there
> a way to automatically generate a launch config or a bndtools bndrun file
> for cxf that makes sense without fighting with all the
> karaf/felix/equinox/... idiosyncrasies?
>
> Thanks,
> matteo
>
>
>
> -----
> matteo
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687p5763692.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: CXF 3.1.4 bundles remain in starting state

Posted by matteo <ma...@gmail.com>.
Thanks, it seems so, at least in terms of effects. Unfortunately, I'm not
using Karaf right now: just Equinox. 
Is anybody using bare OSGi/Equinox + CXF 3.1.4 and experiencing a similar
problem?

By the way, it seems that my second question becomes more relevant: is there
a way to automatically generate a launch config or a bndtools bndrun file
for cxf that makes sense without fighting with all the
karaf/felix/equinox/... idiosyncrasies?

Thanks,
matteo



-----
matteo
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687p5763692.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 3.1.4 bundles remain in starting state

Posted by Aki Yoshida <el...@gmail.com>.
I think your problem is related to the lazy startup issue described here
https://issues.apache.org/jira/browse/CXF-6687


2015-12-08 1:41 GMT+01:00 matteo <ma...@gmail.com>:
> I'm trying to migrate to cxf 3.1.4 from 3.1.2 but I'm somehow blocked. This
> is my OSGi runtime in CXF 3.1.2 (which is working fine):
>
>
>
> And this is what I get if I switch to 3.1.4:
>
>
> All cxf bundles remain in starting state forever. No error, no strange
> messages, nothing.
>
> I'm using a bndtools bndrun file (bndtools v.3.0.0), java 8.
>
> Any ideas?
>
> By the way, this is more or less the same old story whenever I have to
> migrate from cxf version x to cxf  version y in OSGi: hours (if not days) of
> pure pain. Obviously I'm doing something wrong: what is the recommended
> approach to automatically get either a launch configuration or a bndrun file
> for cxf+OSGi out of the cxf distribution?
>
> Thanks!
> matteo
>
>
>
> -----
> matteo
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-1-4-bundles-remain-in-starting-state-tp5763687.html
> Sent from the cxf-user mailing list archive at Nabble.com.