[
https://issues.apache.org/jira/browse/KARAF-5422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483795#comment-16483795
]
ASF subversion and git services commented on KARAF-5422:
--------------------------------------------------------
Commit a65388afb145314bc6537e0edb2e68f2288cccda in karaf's branch
refs/heads/master from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=a65388a ]
Merge pull request #510 from gnodet/KARAF-5422
[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
>
> 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)