Yes, I think so. Let me try to reproduce it ;)

Definitely, I could update the features repo to use the jackson feature provided by karaf specs features repo.

Let me take a deeper look ;)

Regards
JB

On 09/12/2021 09:06, Richard Hierlmeier wrote:
Hmmm,

Both activemq and hawtio feature have dependency=true for jackson.
The cxf-jackson feature has dependency=false:

https://repo1.maven.org/maven2/io/hawt/hawtio-karaf/2.14.0/hawtio-karaf-2.14.0-features.xml <https://repo1.maven.org/maven2/io/hawt/hawtio-karaf/2.14.0/hawtio-karaf-2.14.0-features.xml>

<feature name="hawtio-log" version="2.14.0">
    ...
   <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/2.12.3</bundle>    <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/2.12.3</bundle>    <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/2.12.3</bundle>
</feature>

https://repo1.maven.org/maven2/org/apache/cxf/karaf/apache-cxf/3.4.4/apache-cxf-3.4.4-features.xml <https://repo1.maven.org/maven2/org/apache/cxf/karaf/apache-cxf/3.4.4/apache-cxf-3.4.4-features.xml>

<feature name="cxf-jackson" version="3.4.4">
<bundle start-level="35">mvn:com.fasterxml.jackson.core/jackson-core/2.11.4</bundle> <bundle start-level="35">mvn:com.fasterxml.jackson.core/jackson-annotations/2.11.4</bundle> <bundle start-level="35">mvn:com.fasterxml.jackson.core/jackson-databind/2.11.4</bundle> <bundle start-level="35">mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.11.4</bundle> <bundle start-level="35">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.11.4</bundle> <bundle start-level="35">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.11.4</bundle>
</feature>

https://repo1.maven.org/maven2/org/apache/activemq/activemq-karaf/5.16.3/activemq-karaf-5.16.3-features-core.xml <https://repo1.maven.org/maven2/org/apache/activemq/activemq-karaf/5.16.3/activemq-karaf-5.16.3-features-core.xml>

<feature name="activemq" description="ActiveMQ broker libraries" version="5.16.3">
    ..
   <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/2.12.4</bundle>    <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/2.12.4</bundle>    <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/2.12.4</bundle>
</feature>

So the cxf-jackson feature is the root cause for the refresh, correct?

Regards

   Richard



Am Di., 7. Dez. 2021 um 12:53 Uhr schrieb Jean-Baptiste Onofré <[email protected] <mailto:[email protected]>>:

    If jackson bundles were with dependency=true then it should not be
    installed.

    But, if you have feature 1 with jackson 2.12.4 and feature 2 with
    jackson 2.12.3, both will be installed and so causing refresh.

    Regards
    JB

    On 07/12/2021 12:26, Richard Hierlmeier wrote:
     > But why it has to update  jackson-annotations 2.12.4 to 2.12.3?
     > Shouldn't  the version 2.12.3 be compatible with 2.12.4?
     >
     > IMHO there is for is in this case no update necessary.
     >
     > Does this also mean that activemq is wired to jackson-annotations
    2.12.3?
     >
     >
     > Richard
     >
     > Am Di., 7. Dez. 2021 um 09:13 Uhr schrieb Jean-Baptiste Onofré
     > <[email protected] <mailto:[email protected]> <mailto:[email protected]
    <mailto:[email protected]>>>:
     >
     >     It's exactly related to the refresh caused by several
    combination of
     >     jackson.
     >
     >     That's why it would be better to have a jackson feature
    provided by
     >     karaf and third parties using it to have versions aligned.
     >
     >     Regards
     >     JB
     >
     >     On 07/12/2021 08:32, Richard Hierlmeier wrote:
     >      > I think the refresh itself is not the problem. Most of the
    time is
     >      > wasted between " Adding features: hawtio/[2.14.0,2.14.0] " and
     >     "Changes
     >      > to perform" (96s):
     >      >
     >      > 2021-12-07 08:02:07,355 | INFO  | pipe-feature:install -t -v
     >     hawtio |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      | Adding features:
     >      > hawtio/[2.14.0,2.14.0] |
     >      > 2021-12-07 08:03:43,140 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      | Changes to
    perform: |
     >      > 2021-12-07 08:03:43,141 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |   Region: root |
     >      > 2021-12-07 08:03:43,141 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |     Bundles to
     >     update: |
     >      > 2021-12-07 08:03:43,142 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > com.fasterxml.jackson.core.jackson-annotations/2.12.4 with
     >      > mvn:com.fasterxml.jackson.core/jackson-annotations/2.12.3 |
     >      > 2021-12-07 08:03:43,142 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |     Bundles to
     >     install: |
     >      > 2021-12-07 08:03:43,142 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-log/2.14.0 |
     >      > 2021-12-07 08:03:43,143 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-log-osgi/2.14.0 |
     >      > 2021-12-07 08:03:43,143 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-osgi/2.14.0/war |
     >      > 2021-12-07 08:03:43,143 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-osgi-jmx/2.14.0 |
     >      > 2021-12-07 08:03:43,144 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |   Bundles to
    refresh:
     >      >
     >      > The problem is caused by different versions of
    jackson-annotations
     >      > bundle in the system:
     >      >
     >      > 98 | Active   |  35 | 2.11.4                              |
     >      > mvn:com.fasterxml.jackson.core/jackson-annotations/2.11.4
     >      >   99 | Active   |  80 | 2.12.4                              |
     >      > mvn:com.fasterxml.jackson.core/jackson-annotations/2.12.4
     >      >
     >      > 2.11.4 comes with feature cxf-jackson (version 3.4.5) into
    the system
     >      > 2.12.4 comes activemq 5.16.3 into the system.
     >      >
     >      > When I patch the hawtio feature and set the version number
    of the
     >      > jacksons bundle from 2.12.3 to 2.12.4 the installation of
    the hawtio
     >      > feature takes 4 seconds.
     >      >
     >      > 2021-12-07 08:24:44,504 | INFO  | pipe-feature:install -t -v
     >     hawtio |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      | Adding features:
     >      > hawtio/[2.14.0,2.14.0] |
     >      > 2021-12-07 08:24:48,078 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      | Changes to
    perform: |
     >      > 2021-12-07 08:24:48,079 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |   Region: root |
     >      > 2021-12-07 08:24:48,080 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |     Bundles to
     >     install: |
     >      > 2021-12-07 08:24:48,080 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-log/2.14.0 |
     >      > 2021-12-07 08:24:48,080 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-log-osgi/2.14.0 |
     >      > 2021-12-07 08:24:48,081 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-osgi/2.14.0/war |
     >      > 2021-12-07 08:24:48,081 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |
     >      > mvn:io.hawt/hawtio-osgi-jmx/2.14.0 |
     >      > 2021-12-07 08:24:48,082 | INFO  | features-3-thread-1 |
     >      >
    org.apache.karaf.features.internal.service.FeaturesServiceImpl |
     >     18  -
     >      > org.apache.karaf.features.core - 4.3.3      |   Bundles to
    refresh: |
     >      >
     >      > Regards
     >      >
     >      >   Richard
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      >
     >      > Am Di., 7. Dez. 2021 um 05:45 Uhr schrieb Jean-Baptiste Onofré
     >      > <[email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>
    <mailto:[email protected] <mailto:[email protected]>
     >     <mailto:[email protected] <mailto:[email protected]>>>>:
     >      >
     >      >     Hi,
     >      >
     >      >     When you do feature:install -v, do you see lot of refresh
     >     happening ?
     >      >
     >      >     I will do feature:install -tv to check the resolver output
     >     (it could
     >      >     depend of your runtime, what's installed in there).
     >      >
     >      >     Regards
     >      >     JB
     >      >
     >      >     On 06/12/2021 17:33, Richard Hierlmeier wrote:
     >      >      >
     >      >      > I tried to install the hawtio 2.14.0 feature into
    Karaf 4.3.3
     >      >     instance.
     >      >      > It took more than two minutes until feature becomes
    available.
     >      >      > When I am installing the hawtio feature into a
    blank Karaf
     >     4.3.3 it
     >      >      > takes around 2 seconds.
     >      >      >
     >      >      > I profiled the deployment process and found out
    that 98%
     >     of the
     >      >     time is
     >      >      > consumed in the method
     >      >      >
     >      >      >
    org.apache.felix.resolver.ResolverImpl.calculatePackageSpaces
     >      >      > (org.apache.felix.resolver.ResolverImpl.ResolveSession,
     >      >      > org.apache.felix.resolver.Candidates,
    java.util.Collection)
     >      >      >
     >      >      > You can find an image of the profiling result here:
     >      >      >
     >      >      >
     >      >
     >
    https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7
    <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7>
>  <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7>>
     >      >
>  <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7> <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7>>>
     >      >      >
     >      >
>  <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7> <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7>> <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7> <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7>>>>
     >      >      >
     >      >      > I think the cause of this problem lies somewhere in the
     >     bundles and
>      >      > feature that are already deploy in the Karaf instance. I have
     >      >     installed
     >      >      > cxf, activemq, and some custom features.
     >      >      > I have no glue howto solve this problem.
     >      >      > And it is a problem, because when I add the hawtio
    feature
     >     to the
     >      >     boot
     >      >      > feature list, than the startup of my Karaf instance
    takes also
     >      >     more than
     >      >      > two minutes.
     >      >      >
     >      >      > Any idea?
     >      >      >
     >      >      >
     >      >      > Regards
     >      >      >
     >      >      >    Richard
     >      >      >
     >      >      >
     >      >      >
     >      >      >
     >      >      >
     >      >      >
     >      >      >
     >      >      >
     >      >
     >

Reply via email to