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

Uninstalling jndi feature leads to hanging Karaf

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.9, 2.3.0
    • Fix Version/s: 2.2.11, 2.3.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      MAC OS X 10.8.2, ubuntu 12.04

      Description

      When I install the jndi feature from aries and then uninstall it again Karaf hangs, at least

      • console is frozen
      • Access via ssh is also not possible anymore

      Under ubuntu I get the following message on the console "Error executing command: Invalid BundleContext" before it freezes (only Karaf 2.2.9) and I see a java.lang.IllegalStateException with message "Invalid BundleContext" in the log (both 2.2.9 and 2.3.0), log is attached. Under Mac I don't see any console output nor any exception in the log. Karaf just hangs.

      1. karaf-2.2.9-ubuntu.log
        16 kB
        Zsolt Beothy-Elo

        Activity

        Hide
        xldai Xilai Dai added a comment -

        Not only jndi feature but also jpa feature which including org.apache.aries.util bundle has this problem when uninstall the feature.

        Uninstall will work fine when comment this line:
        <!-bundle start-level="30">mvn:org.apache.aries/org.apache.aries.util/0.3.1</bundle->

        but don't know the root cause of this problem.

        Show
        xldai Xilai Dai added a comment - Not only jndi feature but also jpa feature which including org.apache.aries.util bundle has this problem when uninstall the feature. Uninstall will work fine when comment this line: <!- bundle start-level="30">mvn:org.apache.aries/org.apache.aries.util/0.3.1</bundle -> but don't know the root cause of this problem.
        Hide
        achim_nierbeck Achim Nierbeck added a comment -

        the root cause of this is most probably the fact, that the util bundle is also used by the blueprint bundles, therefore uninstalling it via this feature uninstalling leads to this.
        The features service somehow needs to make sure this doesn't happen, or a much simpler way would be to make jpa and jndi dependent on the blueprint feature and therefore remove the util bundle from those.

        Show
        achim_nierbeck Achim Nierbeck added a comment - the root cause of this is most probably the fact, that the util bundle is also used by the blueprint bundles, therefore uninstalling it via this feature uninstalling leads to this. The features service somehow needs to make sure this doesn't happen, or a much simpler way would be to make jpa and jndi dependent on the blueprint feature and therefore remove the util bundle from those.
        Hide
        xldai Xilai Dai added a comment -

        org.osgi.service.blueprint.container.ServiceUnavailableException: The Blueprint container is being or has been destroyed: (objectClass=org.osgi.service.packageadmin.PackageAdmin)

        when adding:
        <bundle dependency="true" start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/0.3.2</bundle>
        to the jndi feature.

        Show
        xldai Xilai Dai added a comment - org.osgi.service.blueprint.container.ServiceUnavailableException: The Blueprint container is being or has been destroyed: (objectClass=org.osgi.service.packageadmin.PackageAdmin) when adding: <bundle dependency="true" start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/0.3.2</bundle> to the jndi feature.
        Hide
        achim_nierbeck Achim Nierbeck added a comment -

        I meant a dependency to the blueprint feature which is part of the std features file

        Show
        achim_nierbeck Achim Nierbeck added a comment - I meant a dependency to the blueprint feature which is part of the std features file
        Hide
        xldai Xilai Dai added a comment -

        Hi, Achim, sorry but I don't see any feature which named "blueprint" in the std features file (both 2.2.9 and 2.3.0)

        Show
        xldai Xilai Dai added a comment - Hi, Achim, sorry but I don't see any feature which named "blueprint" in the std features file (both 2.2.9 and 2.3.0)
        Hide
        achim_nierbeck Achim Nierbeck added a comment -

        Sorry my fault, those are part of the startup.properties and therefore are not managed through feature anymore. This looks a bit like a bad side-effect of this separation of plain features and startup.properties "features". I think they used to be also available to the std. features in 2.2.x

        Show
        achim_nierbeck Achim Nierbeck added a comment - Sorry my fault, those are part of the startup.properties and therefore are not managed through feature anymore. This looks a bit like a bad side-effect of this separation of plain features and startup.properties "features". I think they used to be also available to the std. features in 2.2.x
        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        The problem (about the JNDI feature) doesn't occur on trunk.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - The problem (about the JNDI feature) doesn't occur on trunk.
        Hide
        xraycat Vlad Untu added a comment -

        I belive that the same happens with JPA.

        Try the folowing (with a fresh copy of Karaf 2.3.0):

        features:install webconsole
        features:install jpa
        features:uninstall jpa

        The web console does not work anymore, restart karaf and nothing works anymore.

        Show
        xraycat Vlad Untu added a comment - I belive that the same happens with JPA. Try the folowing (with a fresh copy of Karaf 2.3.0): features:install webconsole features:install jpa features:uninstall jpa The web console does not work anymore, restart karaf and nothing works anymore.
        Show
        jbonofre Jean-Baptiste Onofré added a comment - Fixed on karaf-2.3.x: http://svn.apache.org/viewvc?view=revision&revision=1445198
        Show
        jbonofre Jean-Baptiste Onofré added a comment - Fixed on karaf-2.2.x: http://svn.apache.org/viewvc?view=revision&revision=1445285

          People

          • Assignee:
            jbonofre Jean-Baptiste Onofré
            Reporter:
            zbeothy Zsolt Beothy-Elo
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development