Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-1049

Error in mina-statemachine manifest prevents using it in Apache Karaf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.12, 2.0.13, 2.0.14, 2.0.15
    • 2.0.16
    • Statemachine
    • None
    • Apache Karaf 4.0.6

    Description

      An error occurs when trying to install a karaf feature that has mina-statemachine bundle as dependency. This effectively prevents using mina in karaf.

      2016-10-20 11:28:39,190 | ERROR | pool-8-thread-1                                                  | apache.karaf.features.internal.service.BootFeaturesInstaller | 8 - org.apache.karaf.features.core - 4.0.6 | Error installing boot features
      org.osgi.framework.BundleException: Could not create bundle object.
      	at org.apache.felix.framework.Felix.installBundle(Felix.java:3057)
      	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
      	at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:117)
      	at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:97)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installBundle(FeaturesServiceImpl.java:1261)
      	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:725)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException: invalid version "${version.commons.lang}": non-numeric "${version"
      	at org.osgi.framework.Version.parseInt(Version.java:170)
      	at org.osgi.framework.Version.<init>(Version.java:126)
      	at org.apache.felix.framework.util.VersionRange.parse(VersionRange.java:98)
      	at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:330)
      	at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:182)
      	at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:121)
      	at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282)
      	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:113)
      	at org.apache.felix.framework.Felix.installBundle(Felix.java:3004)
      	... 11 common frames omitted
      Caused by: java.lang.NumberFormatException: For input string: "${version"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      	at java.lang.Integer.parseInt(Integer.java:569)
      	at java.lang.Integer.parseInt(Integer.java:615)
      	at org.osgi.framework.Version.parseInt(Version.java:168)
      	... 19 common frames omitted
      

      In manifest we have:

      Import-Package: org.apache.mina.core.session;version="2.0.15";resolution
       :=optional,org.slf4j;version="1.7",org.apache.mina.core.filterchain;ver
       sion="2.0.15";resolution:=optional,org.apache.mina.core.service;version
       ="2.0.15";resolution:=optional,org.apache.commons.lang.builder;version=
       "${version.commons.lang}"
      

      commons-lang dependency was removed in this commit: https://github.com/apache/mina/commit/54f05992abfbc797f1ce057df3aadc0314eead34
      But maven-bundle-plugin in pom.xml still contains the Import-Package instruction:

      <Import-Package>
              org.apache.commons.lang.builder;version=${version.commons.lang},
      

      This was found when trying to update 2.0.13 but the problem exists also in 2.0.12, 2.0.14 and 2.0.15.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vepekkar Vesa Pekkarinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: