Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3812

Exception caused by featuresRepositories property being set incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.4
    • karaf
    • None
    • Patch

    Description

      The org.apache.karaf.features.cfg file generated by the Maven plugin included this line:

      featuresRepositories = file:${karaf.home}/etc/f9a8234a-cebf-45b5-9316-2345d36febcd.xml

      When executed in a Windows environment, this creates an invalid URI because karaf.home contains back slashes instead of forward slashes. This results in the exception below being thrown.

      2015-06-29 13:21:31,459 | ERROR | pool-1-thread-1 | BootFeaturesInstaller | 6 - org.apache.karaf.features.core - 4.0.0 | Error installing boot feature repository file:C:\dev\code\karaf-test\target\assembly/etc/f9a8234a-cebf-45b5-9316-2345d36febcd.xml
      java.lang.IllegalArgumentException: Illegal character in opaque part at index 7: file:C:\dev\code\karaf-test\target\assembly/etc/f9a8234a-cebf-45b5-9316-2345d36febcd.xml
      at java.net.URI.create(URI.java:852)[:1.8.0_40]
      at org.apache.karaf.features.internal.service.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:86)[6:org.apache.karaf.features.core:4.0.0]
      at org.apache.karaf.features.internal.service.BootFeaturesInstaller.start(BootFeaturesInstaller.java:76)[6:org.apache.karaf.features.core:4.0.0]
      at org.apache.karaf.features.internal.osgi.Activator.doStart(Activator.java:257)[6:org.apache.karaf.features.core:4.0.0]
      at org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:233)[6:org.apache.karaf.features.core:4.0.0]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_40]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_40]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_40]
      at java.lang.Thread.run(Thread.java:745)[:1.8.0_40]
      Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 7: file:C:\dev\code\karaf-test\target\assembly/etc/f9a8234a-cebf-45b5-9316-2345d36febcd.xml
      at java.net.URI$Parser.fail(URI.java:2848)[:1.8.0_40]
      at java.net.URI$Parser.checkChars(URI.java:3021)[:1.8.0_40]
      at java.net.URI$Parser.parse(URI.java:3058)[:1.8.0_40]
      at java.net.URI.<init>(URI.java:588)[:1.8.0_40]
      at java.net.URI.create(URI.java:850)[:1.8.0_40]
      ... 9 more

      Attachments

        1. KARAF-3812.patch
          0.9 kB
          Jonathan Byrne

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              Jonathan Byrne Jonathan Byrne
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: