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

Error while installing cxf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.1
    • 4.1.2, 4.2.0.M1
    • None
    • Windows 10 64bit
      Java JDK 1.8.0_131

    Description

      Hello,

      I was trying to create a REST application with karaf.
      I know there are examples over the internet showing how this can be achieved (like this one), but usually they use blueprints as DI. My goal is to use Declarative Service instead.

      I followed this guide: it uses Karaf 3.0.3 and CXF 3.1.0, but I *think* it should work with 4.1.1 as well.

      By doing the following:

      karaf@root()> feature:install scr http pax-cdi-web-weld
      karaf@root()> feature:repo-add cxf 3.1.11
      Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.1.11/xml/features
      karaf@root()> feature:install cxf/3.1.11 cxf-jaxrs-cdi/3.1.11
      

      Karaf gives the following error:

      java.lang.IllegalStateException: No inital startlevel yet
              at org.apache.felix.framework.FrameworkStartLevelImpl.setStartLevel(FrameworkStartLevelImpl.java:131)
              at org.apache.karaf.main.Main.setStartLevel(Main.java:605)
              at org.apache.karaf.main.Main$KarafLockCallback.lockAquired(Main.java:711)
              at org.apache.karaf.main.Main.doMonitor(Main.java:382)
              at org.apache.karaf.main.Main.access$100(Main.java:75)
              at org.apache.karaf.main.Main$3.run(Main.java:369)
      

      Furthermore, karaf won't return the console control to me, but remains stuck waiting nothing.

      It's highly possible that my procedure to install pax-cdi and cxf is flawed, but I still think that showing that error on the console and letting the shell going unresponsive are a bug of karaf (or a bug of the underlying OSGi framework, aka felix itself).

      Sorry if this behaviour is not a bug at all, but is just caused by my ignorance of the tool.
      Regards,

      Attachments

        1. karaf_log_install_ukelonn.zip
          8 kB
          Steinar Bang
        2. karaf.log
          128 kB
          Massimo Bono

        Issue Links

          Activity

            People

              cschneider Christian Schneider
              koldar Massimo Bono
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: