[ 
https://issues.apache.org/jira/browse/KARAF-5251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090018#comment-16090018
 ] 

Seth Leger commented on KARAF-5251:
-----------------------------------

Should this be a part of the default Karaf distro? JNA 4.3.0 is already part of 
the Karaf distro in support of systemd integration:

{noformat}
# tar ztf apache-karaf-4.1.1.tar.gz | grep jna
apache-karaf-4.1.1/system/net/java/dev/jna/
apache-karaf-4.1.1/system/net/java/dev/jna/jna/
apache-karaf-4.1.1/system/net/java/dev/jna/jna/4.3.0/
apache-karaf-4.1.1/system/net/java/dev/jna/jna/4.3.0/jna-4.3.0.jar
apache-karaf-4.1.1/system/net/java/dev/jna/jna-platform/
apache-karaf-4.1.1/system/net/java/dev/jna/jna-platform/4.3.0/
apache-karaf-4.1.1/system/net/java/dev/jna/jna-platform/4.3.0/jna-platform-4.3.0.jar
apache-karaf-4.1.1/lib/boot/jna-platform-4.3.0.jar
apache-karaf-4.1.1/lib/boot/jna-4.3.0.jar
{noformat}

Otherwise features that worked fine on Karaf 4.0 and lower stop working on 4.1 
because of this side-effect.

> Installing a feature containing JNA refreshes many system bundles
> -----------------------------------------------------------------
>
>                 Key: KARAF-5251
>                 URL: https://issues.apache.org/jira/browse/KARAF-5251
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.1.0
>            Reporter: Seth Leger
>            Priority: Critical
>
> jline 3.X that is included with the shell in Karaf 4.1+ has an optional 
> dependency on the Java Native Access packages.
> {noformat}
> Import-Package = 
>         com.sun.jna;resolution:=optional,
>         com.sun.jna.ptr;resolution:=optional,
>         com.sun.jna.win32;resolution:=optional,
> ...
> {noformat}
> 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:
> {noformat}
> 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
> {noformat}
> This problem can be reproduced by creating a feature containing the {{jna}} 
> and {{jna-platform}} bundles and installing it on a fresh Karaf instance.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to