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

Matt Pavlovich commented on KARAF-8003:
---------------------------------------

Karaf v4.4.8
Java JDK 11

1. Several bundles added that provide custom new-style commands (using @Action 
annotation)
2. ActiveMQ karaf bundle (uses old-style commands)
3. Third party: Camel commands, Pax Web commands, CXF commands installed
4. Karaf JAAS, Karaf JNDI and SCR features installed that provide karaf commands

The error appears intermittently, more frequently on first boot.





> Karaf shell/console bundle wiring error for jline class
> -------------------------------------------------------
>
>                 Key: KARAF-8003
>                 URL: https://issues.apache.org/jira/browse/KARAF-8003
>             Project: Karaf
>          Issue Type: Bug
>            Reporter: Matt Pavlovich
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>
> {noformat}
>  Exception in thread "Karaf local console user karaf" java.lang.LinkageError: 
> loader constraint violation: loader 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @45304e56 wants 
> to load class org.jline.utils.AttributedString. A different class with the 
> same name was previously loaded by 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @7a014f85. 
> (org.jline.utils.AttributedString is in unnamed module of loader 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @7a014f85, 
> parent loader java.net.URLClassLoader @8e24743)
>       at 
> org.apache.karaf.shell.support.ShellUtil.applyStyle(ShellUtil.java:231)
>       at 
> org.apache.karaf.shell.support.ShellUtil.logException(ShellUtil.java:181)
>       at 
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.readCommand(ConsoleSessionImpl.java:469)
>       at 
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:408)
>       at java.base/java.lang.Thread.run(Thread.java:1583)
> {noformat}
> Class presence for AttributedString
> {noformat}
> karaf@root()> classes | grep jline  | grep -i attributedstring.class          
>                                                                               
>                                                            
> 49 | org/jline/utils/AttributedString.class | exported: false
> 63 | org/jline/utils/AttributedString.class | exported: false
> 65 | org/jline/utils/AttributedString.class | exported: false
> 74 | org/jline/utils/AttributedString.class | exported: true
> {noformat}
> Bundles id to name:
> {noformat}
> karaf@root()> headers 49 | grep -i symbol
> Bundle-SymbolicName = 
> org.apache.karaf.features.command;blueprint.graceperiod:=false
> karaf@root()> headers 63 | grep -i symbol                                     
>                                                                               
>                                                            
> Bundle-SymbolicName = org.apache.karaf.shell.commands
> karaf@root()> headers 65 | grep -i symbol                                     
>                                                                               
>                                                            
> Bundle-SymbolicName = org.apache.karaf.shell.core
> karaf@root()> headers 74 | grep -i symbol                                     
>                                                                               
>                                                            
> Bundle-SymbolicName = org.jline
> {noformat}                    



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to