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

ASF subversion and git services commented on KARAF-5422:
--------------------------------------------------------

Commit d9cc37548fca040db0e7ac404f4880fa9dad0346 in karaf's branch 
refs/heads/karaf-4.0.x from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=d9cc375 ]

[KARAF-5422] Add properties for karaf URI


> Feature Repository with Spaces in Path
> --------------------------------------
>
>                 Key: KARAF-5422
>                 URL: https://issues.apache.org/jira/browse/KARAF-5422
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.0.6, 4.2.0, 4.1.5
>         Environment: OS:
> * OSX 10.12.6
> * CentOS 6
>            Reporter: Stephen Kahmann
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.0.11, 4.1.6, 4.2.1
>
>
> We are generating a custom distribution with boot features using Maven. This 
> creates a features repo xml file (ff74b32b-4c34-43fc-9775-8a83173c4d65.xml) 
> in the $KARAF_HOME/etc directory. The feature is also listed in the 
> org.apache.karaf.features.cfg file:
> {code}
> #
> # Comma separated list of features repositories to register by default
> #
> featuresRepositories = 
> file:${karaf.home}/etc/ff74b32b-4c34-43fc-9775-8a83173c4d65.xml
> {code}
> This works great except for when the distribution is unzipped into a 
> directory with spaces somewhere in the path. This causes a URISyntaxException:
> {code}
> 2017-10-12 17:11:38,669 | ERROR | pool-7-thread-1  | BootFeaturesInstaller    
>         | 8 - org.apache.karaf.features.core - 4.0.6 | Error installing boot 
> feature repository file:/Users/stephen/workspace/dirname with 
> spaces/distribution-1.9.30-SNAPSHOT/etc/ff74b32b-4c34-43fc-9775-8a83173c4d65.xml
> java.lang.IllegalArgumentException: Illegal character in path at index 33: 
> file:/Users/stephen/workspace/dirname with 
> spaces/distribution-1.9.30-SNAPSHOT/etc/ff74b32b-4c34-43fc-9775-8a83173c4d65.xml
>     at java.net.URI.create(URI.java:852)[:1.8.0_131]
>     at 
> org.apache.karaf.features.internal.service.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:104)[8:org.apache.karaf.features.core:4.0.6]
>     at 
> org.apache.karaf.features.internal.service.BootFeaturesInstaller.start(BootFeaturesInstaller.java:93)[8:org.apache.karaf.features.core:4.0.6]
>     at 
> org.apache.karaf.features.internal.osgi.Activator.doStart(Activator.java:260)[8:org.apache.karaf.features.core:4.0.6]
>     at 
> org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:236)[8:org.apache.karaf.features.core:4.0.6]
>     at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
>     at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
> Caused by: java.net.URISyntaxException: Illegal character in path at index 
> 33: file:/Users/stephen/workspace/dirname with 
> spaces/distribution-1.9.30-SNAPSHOT/etc/ff74b32b-4c34-43fc-9775-8a83173c4d65.xml
>     at java.net.URI$Parser.fail(URI.java:2848)[:1.8.0_131]
>     at java.net.URI$Parser.checkChars(URI.java:3021)[:1.8.0_131]
>     at java.net.URI$Parser.parseHierarchical(URI.java:3105)[:1.8.0_131]
>     at java.net.URI$Parser.parse(URI.java:3053)[:1.8.0_131]
>     at java.net.URI.<init>(URI.java:588)[:1.8.0_131]
>     at java.net.URI.create(URI.java:850)[:1.8.0_131]
>     ... 9 more
> {code}
> Can anyone help with this?
> Thanks



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to