Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2476

Sling installer swallows exceptions for properties config file parsing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Installer Core 3.3.4
    • Installer Core 3.3.8
    • Installer
    • None

    Description

      If there is a syntax error in the properties config file (.config), all you get is this:

      org.apache.sling.installer.core.impl.OsgiInstallerImpl Cannot create internal resource (resource will be ignored):InstallableResource, priority=100, id=/libs/sling/config/org.apache.sling.i18n.impl.I18NFilter.config java.io.IOException: Unable to read dictionary from input stream: /libs/sling/config/org.apache.sling.i18n.impl.I18NFilter.config
      at org.apache.sling.installer.core.impl.InternalResource.create(InternalResource.java:99)
      at org.apache.sling.installer.core.impl.OsgiInstallerImpl.createResources(OsgiInstallerImpl.java:277)
      at org.apache.sling.installer.core.impl.OsgiInstallerImpl.updateResources(OsgiInstallerImpl.java:316)
      at org.apache.sling.installer.provider.jcr.impl.JcrInstaller.runOneCycle(JcrInstaller.java:579)
      at org.apache.sling.installer.provider.jcr.impl.JcrInstaller$StoppableThread.run(JcrInstaller.java:265)

      However, debugging shows there is a more specific IOException message available from the dictionary parser:
      java.io.IOException: Unexpected token 78; expected: 61 (line=2, pos=4)

      InternalResource#readDictionary() is swallowing the IOException in line 250 [0]. It should be added to the exception chain.

      [0] http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java?revision=1240017&view=markup

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            alexander.klimetschek Alexander Klimetschek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: