You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2017/02/02 11:47:51 UTC

[jira] [Resolved] (KARAF-4974) service:list does not work if the service property ObjectClass returns an empty array

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

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

> service:list does not work if the service property ObjectClass returns an empty array
> -------------------------------------------------------------------------------------
>
>                 Key: KARAF-4974
>                 URL: https://issues.apache.org/jira/browse/KARAF-4974
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 4.1.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 4.1.1
>
>
> To reproduce build this excample https://github.com/cschneider/Karaf-Tutorial/tree/master/tasklist
> and do:
> feature:repo-add mvn:net.lr.tasklist/tasklist-features/1.0.0-SNAPSHOT/xml
> feature:install example-tasklist-persistence
> The feature installs a felix command which has ObjectClass=[]
> This causes the following error when executing service:list
> java.lang.ArrayIndexOutOfBoundsException: 0
> 	at org.apache.karaf.service.command.ListServices$ServiceClassComparator.compare(ListServices.java:157) [40:org.apache.karaf.service.core:4.1.0]
> 	at org.apache.karaf.service.command.ListServices$ServiceClassComparator.compare(ListServices.java:152) [40:org.apache.karaf.service.core:4.1.0]
> 	at java.util.TimSort.binarySort(TimSort.java:296) [?:?]
> 	at java.util.TimSort.sort(TimSort.java:239) [?:?]
> 	at java.util.Arrays.sort(Arrays.java:1512) [?:?]
> 	at java.util.ArrayList.sort(ArrayList.java:1454) [?:?]
> 	at java.util.Collections.sort(Collections.java:175) [?:?]
> 	at org.apache.karaf.service.command.ListServices.execute(ListServices.java:77) [40:org.apache.karaf.service.core:4.1.0]
> 	at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:82) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:552) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:478) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:367) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [43:org.apache.karaf.shell.core:4.1.0]
> 	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [43:org.apache.karaf.shell.core:4.1.0]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
> 	at java.lang.Thread.run(Thread.java:745) [?:?]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)