Hi,

classpath is not a regular URL: AFAIK, classpath: is a specific Spring URL (not a blueprint regular URL).

Do you use the blueprint spring extender ?

Regards
JB

On 09/09/2016 03:42 PM, Alex Soto wrote:
Hello,

I am trying to deploy a config file which is a resource of one of the
deployed bundles.  I write the features.xml

    <configfile finalname="${karaf.etc}/my.config.cfg">
    classpath://my :: bundle/my.config.cfg
    </configfile>



When I run integration tests (PAX-EXAM) I get this error:

    Error installing boot features
    java.net.MalformedURLException: Unknown protocol: classpath
    at java.net.URL.<init>(URL.java:620)[:1.8.0_45]
    at java.net.URL.<init>(URL.java:483)[:1.8.0_45]
    at java.net.URL.<init>(URL.java:432)[:1.8.0_45]
    at 
org.apache.karaf.features.internal.service.FeatureConfigInstaller.installConfigurationFile(FeatureConfigInstaller.java:210)[9:org.apache.karaf.features.core:4.0.3]
    at 
org.apache.karaf.features.internal.service.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:120)[9:org.apache.karaf.features.core:4.0.3]
    at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:1156)[9:org.apache.karaf.features.core:4.0.3]
    at 
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:769)[9:org.apache.karaf.features.core:4.0.3]
    at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[9:org.apache.karaf.features.core:4.0.3]
    at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[9:org.apache.karaf.features.core:4.0.3]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_45]
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_45]
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_45]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_45]
    Caused by: java.lang.IllegalStateException: Unknown protocol: classpath
    at 
org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)[org.apache.felix.framework-5.4.0.jar:]
    at java.net.URL.<init>(URL.java:615)[:1.8.0_45]
    ... 12 more


Looks it does not recognize the /classpath/ URL handler.  How can make
this work?   I would like the cfg files to be in the bundle that uses it.

Best regards,
Alex soto





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

Reply via email to