Hi Martin,

What are your boot feature ?

If your own feature is part of the boot feature, it should be started in
stage 2, after the framework.

So basically, you should have bootFeatures=(framework,...),your-feature

Regards
JB

On 31/07/2018 14:05, Martin Nielsen wrote:
> It is a runtime problem. The feature verifies and every other feature in
> the feature.xml can be installed.
> 
> This is really odd. It seems it might be a problem with my custom
> distro. When i download the Karaf 4.2.0 zip and install the feature
> there, there is no exception.
> 
> Any idea how a custom distro might cause this issue?
> 
> -Martin
> 
> On Tue, Jul 31, 2018 at 1:42 PM, Jean-Baptiste Onofré <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Hi Martin,
> 
>     do you have this error at runtime or when you verify the feature using
>     the karaf-maven-plugin.
> 
>     It's weird, as we use <configfile/> in the war feature for instance.
> 
>     Regards
>     JB
> 
>     On 31/07/2018 13:08, Martin Nielsen wrote:
>     > I am getting an exception when i am attempting to install a feature
>     > containing a configuration file.
>     >
>     > The feature looks like this:
>     >
>     > <feature>aries-blueprint</feature>
>     >         <configfile finalname="/etc/org.apache.karaf.jaas.cfg"
>     > override="true"> 
>     >            
>      mvn:dk.netdesign.common/karaf-security/4.0.1-SNAPSHOT/cfg/jaas
>     >          </configfile> 
>     >         <configfile finalname="/etc/users.properties"
>     override="true"> 
>     >            
>     >
>      mvn:dk.netdesign.common/karaf-security/4.0.1-SNAPSHOT/properties/users
>     >          </configfile> 
>     >         <bundle>mvn:my/bundle/4.0.1-SNAPSHOT</bundle>
>     >
>     > I tried to add a framework prerequisite as well
>     >
>     > <feature prerequisite="true">framework</feature>
>     > <feature>aries-blueprint</feature>
>     >         <configfile finalname="/etc/org.apache.karaf.jaas.cfg"
>     > override="true"> 
>     >            
>      mvn:dk.netdesign.common/karaf-security/4.0.1-SNAPSHOT/cfg/jaas
>     >          </configfile> 
>     >         <configfile finalname="/etc/users.properties"
>     override="true"> 
>     >            
>     >
>      mvn:dk.netdesign.common/karaf-security/4.0.1-SNAPSHOT/properties/users
>     >          </configfile> 
>     >         <bundle>mvn:my/bundle/4.0.1-SNAPSHOT</bundle>
>     >
>     > No matter what I do I get this exception.
>     >
>     > Has anyone encountered this, or even better, does anyone have a fix?
>     >
>     >
>     >
>     
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.FeaturesServiceImpl]
>     > : Unknown protocol: mvn
>     > java.net <http://java.net>.MalformedURLException: Unknown
>     protocol: mvn
>     >         at java.net.URL.<init>(URL.java:620)
>     >         at java.net.URL.<init>(URL.java:483)
>     >         at java.net.URL.<init>(URL.java:432)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.installConfigurationFile(FeatureConfigInstaller.java:230)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:147)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installConfigs(BundleInstallSupportImpl.java:297)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.installConfigs(FeaturesServiceImpl.java:1141)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:925)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
>     >         at
>     >
>     
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$$Lambda$360/2113030009.call(Unknown
>     > Source)
>     >         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     >         at
>     >
>     
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>     >         at
>     >
>     
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>     >         at java.lang.Thread.run(Thread.java:744)
>     > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>     >         at
>     >
>     
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
>     >         at java.net.URL.<init>(URL.java:615)
>     >         ... 14 more
>     >
>     >
>     > Thank you
>     >
>     > -Martin
> 
>     -- 
>     Jean-Baptiste Onofré
>     [email protected] <mailto:[email protected]>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
> 
> 

-- 
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to