Hello,

 

Sorry to open up such an old thread, but I’m facing a very similar problem. It 
actually the exact same problem, only I am running an integration test in Karaf 
here (Pax Exam 3.2.0, Karaf 2.3.2). Since I’m using useDeployFolder(false), the 
test bundles get deployed as a feature, so I’m running into the same issue that 
“reference” is not working within a feature descriptor. (Using 
useDeployFolder(true) had other problems for me). 

 

Freeman, you suggested to put the pax-url-reference bundle in the system repo 
and add it to startup.properties.

 

I can edit the startup.properties via 
KarafDistributionOptions.editConfigurationFilePut(…), but how can I populate 
the system repository with additional artifacts in my Pax Exam test?

 

Regards,

Benjamin

 

On Tue, May 22, 2012 at 11:47 AM, Freeman-2 wrote: 


> Hi, 
> 
> As you put ODP-Server in featuresBoot, so the reference 
> URLStreamHandlerService should be available at very early stage, so you need 
> put pax-url-reference bundle into $KARAF_HOME/etc/startup.properties,  just 
> like what we do for 
> org/ops4j/pax/url/pax-url-mvn/1.2.8/pax-url-mvn-1.2.8.jar=5 
> org/ops4j/pax/url/pax-url-wrap/1.2.8/pax-url-wrap-1.2.8.jar=5 
> 
> Basically you need add pax-url-reference bundle in startup.properties, also 
> you need ensure add this bundle in $KARAF_HOME/system folder, as when load 
> bundles from startup.properties, won't use mvn to download it remotely, so 
> need ensure it's on your local disk. 
> 
> Take a look at how we do for pax-url-mvn and pax-url-wrap, do same for the 
> pax-reference. 
> 
> Freeman 
> On 2012-5-22, at 下午2:36, Alexey Romanov wrote: 
> 
> Actually, it turns out that reference: URL works for installing files: 
> 
> karaf@root> install 
> reference:file:/home/aromanov/workspaces/odp-server/ru.focusmedia.jsr-275/generated/ru.focusmedia.jsr-275.jar
>  
> Bundle ID: 105 
> 
> but not for features! 
> 
> karaf@root> feature:install ODP-Server 
> Error executing command: Unknown protocol: reference 
> 
> Why could that be? 
> 
> -- 
> View this message in context: 
> http://karaf.922171.n3.nabble.com/How-can-I-enable-reference-URL-handler-tp3988050p4006097.html
> Sent from the Karaf - User mailing list archive at Nabble.com. 
> 
> 
> --------------------------------------------- 
> Freeman Fang 
> 
> FuseSource 
> Email:[hidden email][hidden email] 
> Web: fusesource.com 
> Twitter: freemanfang 
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: http://weibo.com/u/1473905042

Reply via email to