[ 
https://issues.apache.org/jira/browse/KARAF-3908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schneider resolved KARAF-3908.
----------------------------------------
    Resolution: Fixed

> shell:new does not work for most classes
> ----------------------------------------
>
>                 Key: KARAF-3908
>                 URL: https://issues.apache.org/jira/browse/KARAF-3908
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.0.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 4.0.1
>
>
> If you do shell:new for a class that is not directly known to the 
> shell.command bundle you get a ClassNotFoundException.
> The reason is that the DefaultConverter is used to convert from String to 
> Class which uses the bundle classloader. The shell.commands bundle can not 
> know all possible classes.
> A workaround is the do "dynamic-import org.apache.karaf.shell.commands" to 
> make all packages available to the bundle. This opens a lot of possible 
> problems though. 
> So I think a proper solution would be to use the capabilties to find the 
> bundle that exports the package and use the classloader of this bundle to 
> load the class.
> In case there are multiple versions of the package we could allow to specify 
> a bundle to import the package from or allow to specify a version range for 
> the package.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to