Karaf
  1. Karaf
  2. KARAF-491

A war bundle and the war feature can't be installed as parts of a single feature.

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: karaf-core
    • Labels:
      None

      Description

      If a feature contains a bundle that requires the war protocol then the war feature needs to be preinstalled.
      If the user adds the war feature as a feature dependency it does not work.

      Example:
      <features>
      <repository>mvn:org.apache.karaf/apache-karaf/$

      {karaf.version}

      /xml/features</repository>
      <feature "yetanotherfeature">
      <feature>war</feature>
      <bundle>war:net.iocanel/webapp/1.0/war</bundle>
      </feature>
      </features>

      The error I get is Unknown protocol: war.

        Issue Links

          Activity

          Hide
          Achim Nierbeck added a comment -

          Actually the proper url for wars is:

          webbundle:net.iocanel/webapp/1.0/war

          could you retry with that?

          Show
          Achim Nierbeck added a comment - Actually the proper url for wars is: webbundle:net.iocanel/webapp/1.0/war could you retry with that?
          Hide
          Ioannis Canellos added a comment -

          @Achim: I am not sure which is the proper protocol for wars (war is working find as long as the war feature is already installed).
          In any case using webbundle still fails on karaf 2.2.0.

          Show
          Ioannis Canellos added a comment - @Achim: I am not sure which is the proper protocol for wars (war is working find as long as the war feature is already installed). In any case using webbundle still fails on karaf 2.2.0.
          Hide
          Achim Nierbeck added a comment - - edited

          war works because the pax-url bundle supports it

          webbundle is the official osgi-spec protocol for war files.
          what is the log saying?

          Show
          Achim Nierbeck added a comment - - edited war works because the pax-url bundle supports it webbundle is the official osgi-spec protocol for war files. what is the log saying?
          Hide
          Guillaume Nodet added a comment -

          The problem is a limitation in features. For this to work, the pax-url-war bundle need to be started before installing the war, but the karaf features services install all bundles, then start them all, so the war installation fails.

          Show
          Guillaume Nodet added a comment - The problem is a limitation in features. For this to work, the pax-url-war bundle need to be started before installing the war, but the karaf features services install all bundles, then start them all, so the war installation fails.
          Hide
          Guillaume Nodet added a comment -

          This is the exact same issue, though one is from the startup.properties and the other one using features.

          I'd rather solve the problem at features level.

          Show
          Guillaume Nodet added a comment - This is the exact same issue, though one is from the startup.properties and the other one using features. I'd rather solve the problem at features level.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ioannis Canellos
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development