kar deployement issue

43 views
Skip to first unread message

samuel pouchin

unread,
Jul 19, 2016, 8:37:07 PM7/19/16
to ddf-users
Hi,

I have actually a kar bundle deployment issue using DDF 2.9.0

If I try to deploy this bundle, on the workstation which is the workstation where I have build the kar bundle (using maven, eclipse neon and java jdk8) and also where a DDF2.9.0 is running. On this workstation, the  deployement  ok.

My problem appears when I try to deploy my bundle on a workstation where only DDF 2.9.0 is installed and runing.
When I try to deply my bundle I have the following stacktrace:

2016-07-19 12:26:32,562 | WARN  | ddf-2.9.0/deploy | KarServiceImpl                   | araf.kar.internal.KarServiceImpl  263 | 46 - org.apache.karaf.kar.core - 4.0.4 | Unable to add repository 'mvn:ddf/csd-to-ddf-client-parent/0.0.9/xml/features'
java.io.IOException: Error resolving artifact ddf:csd-to-ddf-client-parent:xml:features:0.0.9: Could not find artifact ddf:csd-to-ddf-client-parent:xml:features:0.0.9 : mvn:ddf/csd-to-ddf-client-parent/0.0.9/xml/features
at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:96)[9:org.apache.karaf.features.core:4.0.4]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.loadRepository(FeaturesServiceImpl.java:391)[9:org.apache.karaf.features.core:4.0.4]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:411)[9:org.apache.karaf.features.core:4.0.4]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:402)[9:org.apache.karaf.features.core:4.0.4]
at org.apache.karaf.kar.internal.KarServiceImpl.addToFeaturesRepositories(KarServiceImpl.java:260)[46:org.apache.karaf.kar.core:4.0.4]

Any ideas
Thanks for your help
Samuel


Jay McNallie

unread,
Jul 19, 2016, 8:49:18 PM7/19/16
to ddf-users

Hi Samuel,

 

This is b/c the features file you’re looking for is not getting deployed into the $DDF_HOME/system repository.  When you run it on your development box, it falls back to your local maven repo if it can’t find the artifact.  On your other machine, there’s nothing to fall back to so the app install fails. 

 

Take a look at https://github.com/codice/ddf/blob/master/distribution/ddf/pom.xml#L58 and make sure your features file is getting added to the karaf container’s system repo when you’re building up your distribution.

 

Hope that helps,

-jay

--
You received this message because you are subscribed to the Google Groups "ddf-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ddf-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

samuel pouchin

unread,
Jul 21, 2016, 8:56:38 AM7/21/16
to ddf-users
Thanks Jay.
With your answer, I have find a temporary workaround.

R.A. Porter

unread,
Mar 2, 2017, 8:23:27 AM3/2/17
to ddf-users
Samuel,

This issue came up again on a production server recently and I spent a little time digging into it. It appears that this was a subtle bug that we introduced some time in the last year. As we package and distribute DDF with all of its feature repositories, we rarely if ever need to hot-deploy a KAR in a production environment. On those rare occasions where we do hot-deploy, it is - as it was for you initially - on a development machine with a local maven repository.

A fix has been committed to the master branch of DDF (which will be released as version 2.11.0 some time later this year) and to the 2.10.x branch. The 2.10.1 release is scheduled for release this month and will be available for download; it will include this fix.

If you want to apply the change yourself to an extant system, it is a simple change to a Karaf configuration file that you can easily make after unzipping the DDF distribution or anytime prior to hot-deploying. Take a look at this commit for the change: https://github.com/codice/ddf/commit/7c95ca8276cb6d3dfefd37bdf6d6b4408baa90e2

I apologize for the inconvenience.

-R.A. Porter
Reply all
Reply to author
Forward
0 new messages