karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ezequiel Rosas Garcia (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4964) Can't convert wrap URL used in shell commands
Date Sun, 05 Feb 2017 09:46:41 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853181#comment-15853181
] 

Ezequiel Rosas Garcia commented on KARAF-4964:
----------------------------------------------

Hello. I've been able to reproduce this problem, and found a workaround.
The issue is due to java.net.URI and java.net.URL not allowing the quotation mark (") in its
constructor.

So, merely escaping that quote character (changing it for %22) does allow the command to properly
go through:

{noformat}
karaf@root()> bundle:install 'wrap:mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.8.6$overwrite=merge&Import-Package=javax.ws.rs;version=%22[2.0,3)%22'
Bundle ID: 52
karaf@root()> list
START LEVEL 100 , List Threshold: 50
ID | State     | Lvl | Version | Name
---------------------------------------------------
52 | Installed |  80 | 2.8.6   | Jackson-JAXRS-JSON
karaf@root()> headers 52 | grep 'javax.ws.rs;version='
Generated-By-Ops4j-Pax-From = wrap:mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.8.6$overwrite=merge&Import-Package=javax.ws.rs;version=%22[2.0,3)%22
        javax.ws.rs;version="[2.0,3)"
{noformat}

I'm also proposing a patch to automatically do this small escaping: https://github.com/apache/karaf/pull/278

> Can't convert wrap URL used in shell commands
> ---------------------------------------------
>
>                 Key: KARAF-4964
>                 URL: https://issues.apache.org/jira/browse/KARAF-4964
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.1.0, 4.0.8
>            Reporter: Jean-Baptiste Onofré
>             Fix For: 4.0.9, 4.1.1
>
>
> The following command:
> {code}
> karaf@root()> bundle:install 'wrap:mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.8.6$overwrite=merge&Import-Package=javax.ws.rs;version="[2.0,3)"'
> {code}
> fails:
> {code}
> Error executing command bundle:install: unable to convert argument urls with value '[wrap:mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.8.6$overwrite=merge&Import-Package=javax.ws.rs;version="[2.0,3)"]'
to type java.util.List<java.net.URI>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message