You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Debeerst Benjamin <de...@younicos.com> on 2013/09/19 11:50:17 UTC

Re: How can I enable reference URL handler?

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


Re: How can I enable reference URL handler?

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Not sure how to handle it using pax-exam, you can build a customer kit with those changes you need anyway.
−−−−−−−−−−−−−
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-9-19, at 下午5:50, Debeerst Benjamin wrote:

> 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.editC onfigurationFilePut(…), 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
> 
>