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: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0.M3
    • 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

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          1176d 22h 19m 1 Guillaume Nodet 19/May/14 20:18
          Guillaume Nodet made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Guillaume Nodet [ gnt ]
          Resolution Fixed [ 1 ]
          Guillaume Nodet made changes -
          Link This issue is part of KARAF-2988 [ KARAF-2988 ]
          Jean-Baptiste Onofré made changes -
          Fix Version/s 3.1.0 [ 12316946 ]
          Component/s runtime [ 12313724 ]
          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.
          Guillaume Nodet made changes -
          Field Original Value New Value
          Link This issue is related to KARAF-334 [ KARAF-334 ]
          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
          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
          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 -

          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?
          Ioannis Canellos created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development