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

org.apache.karaf.webconsole.console imports wrong version of org.osgi.service.deploymentadmin

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.9
    • Fix Version/s: 2.2.10
    • Component/s: karaf-webconsole
    • Labels:
      None

      Description

      Import-Package: ...
      ... org.osgi.service.deploymentad
      min;resolution:=optional;version="[1.1,2)",

      the version of deploymentadmin should be 1.0, please refer https://issues.apache.org/jira/browse/FELIX-3678

      now will get this exception:

      java.lang.NoClassDefFoundError: org/osgi/service/deploymentadmin/DeploymentException
      at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.7.0_05]
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)[:1.7.0_05]
      at java.lang.Class.getConstructor0(Class.java:2714)[:1.7.0_05]
      at java.lang.Class.newInstance0(Class.java:343)[:1.7.0_05]
      at java.lang.Class.newInstance(Class.java:325)[:1.7.0_05]
      at org.apache.felix.webconsole.internal.servlet.PluginHolder$InternalPlugin.doGetConsolePlugin(PluginHolder.java:761)[75:org.apache.karaf.webconsole.console:2.2.9]
      at org.apache.felix.webconsole.internal.servlet.PluginHolder$Plugin.getConsolePlugin(PluginHolder.java:532)[75:org.apache.karaf.webconsole.console:2.2.9]
      at org.apache.felix.webconsole.internal.servlet.PluginHolder.getLocalizedLabelMap(PluginHolder.java:242)[75:org.apache.karaf.webconsole.console:2.2.9]
      at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:420)[75:org.apache.karaf.webconsole.console:2.2.9]
      at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:384)[75:org.apache.karaf.webconsole.console:2.2.9]
      at org.apache.felix.webconsole.internal.KarafOsgiManager.doService(KarafOsgiManager.java:67)[75:org.apache.karaf.webconsole.console:2.2.9]
      at org.apache.felix.webconsole.internal.KarafOsgiManager$1.run(KarafOsgiManager.java:47)[75:org.apache.karaf.webconsole.console:2.2.9]

        Issue Links

          Activity

          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          Fixed with the upgrade to Felix WebConsole 4.0.0

          Show
          jbonofre Jean-Baptiste Onofré added a comment - Fixed with the upgrade to Felix WebConsole 4.0.0
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          I found the issue: the problem is in Felix WebConsole and handling of webconsole-plugin loading. Felix WebConsole 4.0.0 fixes that, I'm creating a Jira to upgrade on Karaf 2.2.x (that I gonna link to this one).

          Show
          jbonofre Jean-Baptiste Onofré added a comment - I found the issue: the problem is in Felix WebConsole and handling of webconsole-plugin loading. Felix WebConsole 4.0.0 fixes that, I'm creating a Jira to upgrade on Karaf 2.2.x (that I gonna link to this one).
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          It's weird as DeployAdmin version is 1.1 in OSGi r4.2:

          http://www.osgi.org/javadoc/r4v42/

          I think that some additional bundles should be installed for webconsole, especially:

          org.apache.felix/org.apache.felix.deploymentadmin/0.9.0
          org.apache.felix/org.apache.felix.scr/1.6.2

          Show
          jbonofre Jean-Baptiste Onofré added a comment - It's weird as DeployAdmin version is 1.1 in OSGi r4.2: http://www.osgi.org/javadoc/r4v42/ I think that some additional bundles should be installed for webconsole, especially: org.apache.felix/org.apache.felix.deploymentadmin/0.9.0 org.apache.felix/org.apache.felix.scr/1.6.2
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          A "simple" workaround is to downgrade the Felix WebConsole version as the latest one "requires" OSGi r4.3 (and Karaf 2.2.x is only OSGi r4.2).

          Show
          jbonofre Jean-Baptiste Onofré added a comment - A "simple" workaround is to downgrade the Felix WebConsole version as the latest one "requires" OSGi r4.3 (and Karaf 2.2.x is only OSGi r4.2).
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          The problem is not about the import version range, it's more about that scr/deployadmin are not deployed at all. I gonna fix that.

          Show
          jbonofre Jean-Baptiste Onofré added a comment - The problem is not about the import version range, it's more about that scr/deployadmin are not deployed at all. I gonna fix that.

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              xldai Xilai Dai
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development