Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Won't Fix
-
4.1.0
-
None
-
None
Description
jline 3.X that is included with the shell in Karaf 4.1+ has an optional dependency on the Java Native Access packages.
Import-Package = com.sun.jna;resolution:=optional, com.sun.jna.ptr;resolution:=optional, com.sun.jna.win32;resolution:=optional, ...
This means that if you install a feature that includes the JNA bundles, it will refresh the jline bundle and all related bundles to satisfy this dependency. The group of related bundles that gets refreshed seems to be very large and can have a variety of negative side-effects:
- Terminating the current SSH session
- Terminating subsequent feature installations
- The shell.init.script seems to get interrupted as it refreshes, printing a lot of error messages:
karaf@root()> feature:install java-native-access Error executing command: java.lang.InterruptedException __ __ ____ / //_/____ __________ _/ __/ / ,< / __ `/ ___/ __ `/ /_ / /| |/ /_/ / / / /_/ / __/ /_/ |_|\__,_/_/ \__,_/_/ 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. Error in initialization script: /root/Downloads/apache-karaf-4.1.1/etc/shell.init.script: Task java.util.concurrent.FutureTask@3c8bdda9 rejected from java.util.concurrent.ThreadPoolExecutor@7989445c[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] Error in initialization script: /root/Downloads/apache-karaf-4.1.1/etc/scripts/shell.completion.script: null
This problem can be reproduced by creating a feature containing the jna and jna-platform bundles and installing it on a fresh Karaf instance.
Attachments
Issue Links
- relates to
-
KARAF-5384 Optional dependencies in MINA SSHD Core cause system bundle refreshes
- Resolved