Hi Arnaud,
As I guess you are using the Talend runtime, can you please send the kar to me
(using [email protected]). I will investigate.
Thanks,
Regards
JB
On 10/19/2017 04:50 PM, Arnaud Geslin wrote:
OK, so I unzipped the kar file and got 2 files :
/
/
/repository/gfc/R_FRONTAL_HTTP/R_FRONTAL_HTTP/0.2/R_FRONTAL_HTTP-0.2.jar/
/repository/gfc/R_FRONTAL_HTTP/R_FRONTAL_HTTP-feature/0.2/R_FRONTAL_HTTP-feature-0.2.xml
/
the xml file contains some /<feature>/ tags for features dependencies, some
/<config>/ tags for Talend Contexts and
"/<bundle>mvn:gfc.R_FRONTAL_HTTP/R_FRONTAL_HTTP/0.2</bundle>"/
Unfortunatly, in karaf console : "/feature:repo-add
file:/.../repository/gfc/R_FRONTAL_HTTP/R_FRONTAL_HTTP-feature/0.2/R_FRONTAL_HTTP-feature-0.2.xml/"
fails with error messages in the log :
"/org.ops4j.pax.url.mvn.internal.AetherBasedResolver 659 | 1 -
org.ops4j.pax.logging.pax-logging-api - 1.8.5 | Error resolving
artifactgfc.R_FRONTAL_HTTP:R_FRONTAL_HTTP:jar:0.2:Could not find artifact
gfc.R_FRONTAL_HTTP:R_FRONTAL_HTTP:jar:0.2 in defaultlocal
(file:/home/karaf/.m2/repository/)/"
I saw I could define repo directories in
org.ops4j.pax.url.mvn.defaultRepositories section of org.ops4j.pax.url.mvn.cfg
file, but to go ahead I created the default /home/karaf/.m2/repository dir and
copied the jar file into it, or even the complete gfc/... tree, but it fails
with the same error.
We didn't need to manually use maven before as /deploy dir did all the stuff,
and I don't know what Karaf exactly does with Maven when we use this hot deploy way.
"/mvn:gfc.R_FRONTAL_HTTP/R_FRONTAL_HTTP/0.2</bundle>/" is exactly what we see
with "/bundle:list -l /" command when it is hot deployed.
Arnaud
PS : sorry if the discussion thread is not perfect but I get an NAML error in
Nabble when posting via web GUI, and also when answering directly to the emails
I receive.
Le jeudi 19 octobre 2017 à 14:32:32 UTC+2, jbonofre [via Karaf]
<[email protected]> a écrit :
The noAutoRefreshBundles should work "on the fly", the restart will perform a
refresh as it's a new wiring.
Can you do the feature:install -t -v on a freshly installed Karaf (as it needs
to call with an "empty" features set) ?
A kar is basically a zip file containing a features XML. So instead of using the
deploy folder, you can register the features XML using feature:repo-add and then
install the features.
Regards
JB
On 10/19/2017 02:26 PM, Arnaud Geslin wrote:
> Hi Jean-Baptiste,
>
> Thanks for the reply.
> Unfortunatly, theses options don't give more info :
>
> /karaf@trun()> feature:uninstall R_FRONTAL_HTTP-feature
> karaf@trun()>
> karaf@trun()> feature:install -t -v R_FRONTAL_HTTP-feature
> Adding features: R_FRONTAL_HTTP-feature/[0.2.0,0.2.0]
> /
> /karaf@trun()>/
> /
> /
> /> You can disable the auto-refresh (on kar or feature) to avoid this. /
>
> Could you please tell me how to do that ?
> From now, the only way we know to deploy things is to drop the kar file in
the
> deploy directory, as seen in the Talend docs and trainings. It deploys into
data
> dir then installs both the feature and its bundles.
>
> I don't know how to install a new feature from a kar file if it has never
been
> installed before. And the -r option for command-line installs only exists for
> features and not for bundles.
>
> NB : we also tried "noAutoRefreshBundles=true" in
etc/org.apache.karaf.kar.cfg
> and after restarting Karaf it did not avoid bundles refresh
>
> Best regards
> Arnaud
>
>
> Le jeudi 19 octobre 2017 à 11:13:34 UTC+2, Arnaud Geslin <[hidden email]>
> a écrit :
>
>
> Hello
>
> We build kar files with Talend studio (some Camel routes) that are completly
> independent. When deploying thoses files by copy in container/deploy of by
> "bundle:install file://..." in the console, it sometimes refreshes all the
other
> bundles already installed and active. ("stopping","resolved" then "active"
> again). This is a bit ennoying on a production system.
>
> I've searched in the ML archive but did not find any discussion about
precisely
> the same issue
>
> The log says :
>
> ------------------------
> /Changes to perform:
> Region: root
> Bundles to install:
> mvn:gfc.R_FRONTAL_HTTP/R_FRONTAL_HTTP/0.2
> mvn:org.apache.camel/camel-jetty-common/2.17.3
> mvn:org.apache.camel/camel-jetty9/2.17.3
> mvn:org.codehaus.woodstox/stax2-api/3.1.4
> Installing bundles:
> mvn:gfc.R_FRONTAL_HTTP/R_FRONTAL_HTTP/0.2
> mvn:org.apache.camel/camel-jetty-common/2.17.3
> mvn:org.apache.camel/camel-jetty9/2.17.3
> mvn:org.codehaus.woodstox/stax2-api/3.1.4
> Stopping bundles:
> gfc.R7_PU017B_BP_FROMKHEOPSTOSAP/0.1.0
> gfc.R_BROKER_KHEOPS/0.1.0
> ...
> Refreshing bundles:
> activemq-karaf/5.14.1 (*Wired to
org.apache.activemq.activemq-osgi/5.14.1
> which is being refreshed)*
> gfc.R7_PU017B_BP_FROMKHEOPSTOSAP/0.1.0 (*Wired to
> org.apache.activemq.activemq-osgi/5.14.1 which is being refreshed*)
> gfc.R_BROKER_BUS/0.1.0 (Wired to
org.apache.activemq.activemq-osgi/5.14.1
> which is being refreshed)
> gfc.R_BROKER_KHEOPS/0.1.0 (Wired to
> org.apache.activemq.activemq-osgi/5.14.1 which is being refreshed)/
> ---------------
>
> That's right all thoses bundles use activemq, but this feature is already
> installed and I don't understand why it should be refreshed when installing a
> new bundle, and then all the bundles wired to it.
> Same issue for bundles that use Apache cxf.
>
> I tried this workaround :
> /[root@kardev01 container]# cat etc/org.apache.karaf.features.cfg
> ...
> featuresBoot=\
> (instance, \
> activemq-client, \
> activemq-camel, \
> activemq, \
> package, \/
>
> and also added in startup.properties :
> /mvn\:joda-time/joda-time/2.9.2 = 50/
>
> but it had no effect.
>
> I also tried an other workaround, unzipping the kar file, to remove in the
> feature-xx.xml file the dependencies to activemq
(/<feature>activemq</feature>/
> and /<feature>activemq-camel</feature>/) then zip again the kar, and deploy
it
> again but the bundles are still refreshed.
>
> I guess we don't really need to refresh the activemq or cxf features, how
could
> we avoid this ?
>
> Thank you
> Loko
--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend -
http://www.talend.com
--------------------------------------------------------------------------------
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/Avoid-unwanted-refresh-of-bundles-wired-to-activemq-or-cxf-features-tp4051705p4051712.html
To unsubscribe from Avoid unwanted refresh of bundles wired to activemq or cxf
features, click here
<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4051705&code=YXJuYXVkZ2VzbGluQHlhaG9vLmZyfDQwNTE3MDV8LTIxMjIxOTYyNzE=>.
NAML
<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com