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

Whitespace in feature file bundle element value causes NumberFormatException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.2, 4.0.0.M3
    • Component/s: karaf
    • Labels:
      None
    • Environment:

      Windows 7; Java version 1.7.0_51

      Description

      Preceding Whitespace in bundle element value is being preserved.

      <<.NumberFormatException: For input string: " mvn:org...">>

      Install the following in karaf 3.0.1:
      <?xml version="1.0" encoding="UTF-8"?>
      <features name="problems"
      xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
      <feature name="problem">
      <bundle>
      mvn:org.apache.commons/commons-lang3/3.3.2
      </bundle>
      </feature>
      </features>

      Shutdown karaf. On karaf statup the following is displayed at the karaf console:

      ERROR: Error reloading cached bundle,
      removing it: C:\lib\apache-karaf-3.0.1\data\cache\bundle118 (java.lang.NumberFormatException:
      For input string: " mvn:org.apache.commons/commons-lang3/3.3.2")
      java.lang.NumberFormatException: For input string: " mvn:org.apache.commons/commons-lang3/3.3.2"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:481)
      at java.lang.Integer.parseInt(Integer.java:527)
      at org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:959)
      at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:182)
      at org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:247)

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Fang
              Reporter:
              tpines Tom Pines
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: