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

Fileinstall incorrectly parses .config files

    XMLWordPrintableJSON

Details

    Description

      Support for array values encoded as strings inside of .config files is broken in given Karaf versions. Reasons for that are different between them as Karaf 4.0.10 uses new version of fileinstall, however result is the same - config values are always strings regardless of correctness of value notation. Karaf 4.0.8 and 4.0.9 in general are broken due to bug in fileinstall or config admin as they tend to override source configuration with some partia representation malformed by configuration parser.
      For karaf 4.0.10, even if it uses fileinstall 3.6.0 there is no way, so far - to force configuration to be typed.

      "Error message for fileinstall 3.5.x:"
      java.io.IOException: Unexpected token 78; expected: 61 (line=39, pos=4)
      	at org.apache.felix.cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:650)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:274)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.cm.file.ConfigurationHandler.read(ConfigurationHandler.java:237)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.fileinstall.internal.ConfigInstaller.setConfig(ConfigInstaller.java:237)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.fileinstall.internal.ConfigInstaller.install(ConfigInstaller.java:78)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:937)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)[4:org.apache.felix.fileinstall:3.5.4]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)[4:org.apache.felix.fileinstall:3.5.4]
      

      Line 39 and position 4 is middle of property key.

      Attachments

        1. com.example.role.config
          0.3 kB
          Łukasz Dywicki

        Activity

          People

            gnodet Guillaume Nodet
            ldywicki Łukasz Dywicki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: