Fwiw, the "java.lang.IllegalStateException: No inital startlevel yet" exception is a felix framework issue, FELIX-5649.
2017-06-06 8:23 GMT+02:00 Shyalika Benthotage < [email protected]>: > Hi, > > I think the issue is in the container, not jna. I tried to install cxf and > it gives me the same exception causing karaf to exit. The steps I used are > > *karaf*@root()> feature:repo-add cxf > > > > Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/RELEASE/xml/ > features > > *karaf*@root()> feature:install cxf > > > > Error executing command: java.lang.InterruptedException > > 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) > > > > > > The log: > > > > 2017-06-06T16:19:36,244 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > mvn:org.codehaus.woodstox/stax2-api/3.1.4 > 2017-06-06T16:19:36,251 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1 > 2017-06-06T16:19:36,291 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | Stopping bundles: > 2017-06-06T16:19:36,292 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.event/4.1.1 > 2017-06-06T16:19:36,294 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.event/4.1.1 > 2017-06-06T16:19:36,304 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | org.jline/3.2.0 > 2017-06-06T16:19:36,305 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.sshd.core/1.4.0 > 2017-06-06T16:19:36,306 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.shell.commands/4.1.1 > 2017-06-06T16:19:36,307 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.shell.commands/4.1.1 > 2017-06-06T16:19:36,308 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.service.core/4.1.1 > 2017-06-06T16:19:36,309 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.service.core/4.1.1 > 2017-06-06T16:19:36,313 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.jaas.command/4.1.1 > 2017-06-06T16:19:36,314 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.jaas.command/4.1.1 > 2017-06-06T16:19:36,316 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.features.command/4.1.1 > 2017-06-06T16:19:36,317 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.features.command/4.1.1 > 2017-06-06T16:19:36,318 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.diagnostic.core/4.1.1 > 2017-06-06T16:19:36,319 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.diagnostic.core/4.1.1 > 2017-06-06T16:19:36,326 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.instance.core/4.1.1 > 2017-06-06T16:19:36,327 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.instance.core/4.1.1 > 2017-06-06T16:19:36,332 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.system.core/4.1.1 > 2017-06-06T16:19:36,333 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.system.core/4.1.1 > 2017-06-06T16:19:36,343 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.shell.ssh/4.1.1 > 2017-06-06T16:19:36,360 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.shell.ssh/4.1.1 > 2017-06-06T16:19:36,397 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.shell.core/4.1.1 > 2017-06-06T16:19:36,398 | INFO | pool-3-thread-1 | BlueprintExtender > | 12 - org.apache.aries.blueprint.core - 1.8.0 | Destroying > BlueprintContainer for bundle org.apache.karaf.shell.core/4.1.1 > 2017-06-06T16:19:36,413 | ERROR | Karaf local console user karaf | > ShellUtil | 42 - org.apache.karaf.shell.core - 4.1.1 > | Exception caught while executing command > java.lang.InterruptedException > at java.lang.Object.wait(Native Method) ~[?:?] > at java.lang.Object.wait(Object.java:502) [?:?] > at org.apache.felix.gogo.runtime.CommandSessionImpl$JobImpl. > start(CommandSessionImpl.java:772) [42:org.apache.karaf.shell.core:4.1.1] > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:284) > [42:org.apache.karaf.shell.core:4.1.1] > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:157) > [42:org.apache.karaf.shell.core:4.1.1] > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:148) > [42:org.apache.karaf.shell.core:4.1.1] > at > org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:168) > [42:org.apache.karaf.shell.core:4.1.1] > at org.apache.karaf.shell.impl.console.ConsoleSessionImpl. > run(ConsoleSessionImpl.java:354) [42:org.apache.karaf.shell.core:4.1.1] > at java.lang.Thread.run(Thread.java:745) [?:?] > 2017-06-06T16:19:36,418 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.bundle.core/4.1.1 > 2017-06-06T16:19:36,419 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.deployer.kar/4.1.1 > 2017-06-06T16:19:36,420 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.log.core/4.1.1 > 2017-06-06T16:19:36,420 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.config.core/4.1.1 > 2017-06-06T16:19:36,421 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.package.core/4.1.1 > 2017-06-06T16:19:36,422 | INFO | pool-3-thread-1 | CommandExtension > | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering > commands for bundle org.apache.karaf.kar.core/4.1.1 > 2017-06-06T16:19:36,426 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.package.core/4.1.1 > 2017-06-06T16:19:36,429 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.log.core/4.1.1 > 2017-06-06T16:19:36,435 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.kar.core/4.1.1 > 2017-06-06T16:19:36,440 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.config.core/4.1.1 > 2017-06-06T16:19:36,444 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.bundle.core/4.1.1 > 2017-06-06T16:19:36,459 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.bundle.blueprintstate/4.1.1 > 2017-06-06T16:19:36,461 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.apache.karaf.deployer.kar/4.1.1 > 2017-06-06T16:19:36,462 | INFO | pool-3-thread-1 | FeaturesServiceImpl > | 9 - org.apache.karaf.features.core - 4.1.1 | > org.ops4j.pax.logging.pax-logging-log4j2/1.9.1 > Jun 06, 2017 4:19:37 PM org.apache.karaf.main.lock.SimpleFileLock lock > INFO: Trying to lock /Users/shyalika/Downloads/apache-karaf-4.1.1/lock > Jun 06, 2017 4:19:37 PM org.apache.karaf.main.lock.SimpleFileLock lock > INFO: Lock acquired > > > On Mon, Jun 5, 2017 at 4:22 PM, Shyalika Benthotage <shyalika.benthotage@ > medialinksaustralia.com.au> wrote: > >> Please note that we cannot work with a snapshot. We are trying to use >> 4.1.1 or any 4.x stable version for our production. I have attached a >> sample feature file that I am trying to deploy to karaf 4.1.1 and the karaf >> log when it failed. Also please see the karaf console behaviour below. This >> feature file might work at a random occasion, but you never know when it >> would fail. I have been trying the whole day to come up with a pattern, but >> it is completely random. Please let me know what I am doing wrong here. >> >> >> I am on OSX Captain 10.11.6 >> >> sh-3.2# bin/karaf clean >> >> __ __ ____ >> >> / //_/____ __________ _/ __/ >> >> / ,< / __ `/ ___/ __ `/ /_ >> >> / /| |/ /_/ / / / /_/ / __/ >> >> /_/ |_|\__,_/_/ \__,_/_/ >> >> >> * Apache Karaf* (4.1.1) >> >> >> Hit '*<tab>*' for a list of available commands >> >> and '*[cmd] --help*' for help on a specific command. >> >> Hit '*<ctrl-d>*' or type '*system:shutdown*' or '*logout*' to shutdown >> Karaf. >> >> >> *karaf*@root()> >> >> >> 16:09:33 >> >> java.lang.IllegalStateException: No inital startlevel yet >> >> at org.apache.felix.framework.FrameworkStartLevelImpl.setStartL >> evel(FrameworkStartLevelImpl.java:131) >> >> at org.apache.karaf.main.Main.setStartLevel(Main.java:605) >> >> at org.apache.karaf.main.Main$KarafLockCallback.lockAquired(Mai >> n.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) >> >> >> >> >> On Fri, Jun 2, 2017 at 6:30 PM, Guillaume Nodet <[email protected]> >> wrote: >> >>> JNA is an optional dependency on JLine (used by the shell), so if you >>> install JNA, it will refresh jline, hence the karaf shell. >>> However, the shell should come back immediately in a usable state. >>> You can reproduce using: >>> > install mvn:net.java.dev.jna/jna/RELEASE >>> > refresh org.jline >>> >>> On 4.1.2-SNAPSHOT, the shell comes back correctly. >>> >>> 2017-06-02 7:10 GMT+02:00 Shyalika Benthotage < >>> [email protected]>: >>> >>>> Hi, >>>> >>>> We have been using 3.0.3 for some time now and trying to migrate to >>>> karaf 4.x. As a part of our application, when I try to deploy jna 4.3.0 or >>>> 4.4.0 it sometimes just stay in the 'starting' state or undeploys >>>> everything including the shell, causing it to exit. >>>> >>>> I have attached the log here. >>>> >>>> Can anyone shed some light on what's happening here? >>>> >>>> Thanks, >>>> >>>> Shyalika >>>> >>> >>> >>> >>> -- >>> ------------------------ >>> Guillaume Nodet >>> >>> >> > -- ------------------------ Guillaume Nodet
