[
https://issues.apache.org/jira/browse/KARAF-3217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17252123#comment-17252123
]
Jean-Baptiste Onofré commented on KARAF-3217:
---------------------------------------------
{{scr:info}} expects the component as argument. For instance:
{code:java}
karaf@root()> scr:info ServiceComponentRuntimeBundleStateService
Component Description: ServiceComponentRuntimeBundleStateService
================================================================
Class: org.apache.karaf.scr.state.ScrBundleStateService
Bundle: 57 (org.apache.karaf.scr.state:4.3.1.SNAPSHOT)
Enabled: true
Immediate: false
Services: [org.apache.karaf.bundle.core.BundleStateService]
Scope: singleton
Config PID(s): [ServiceComponentRuntimeBundleStateService], Policy: optional
Base Props: (0 entries)
Component Configuration Id: 0
-----------------------------
State: ACTIVE
Service: 107 [org.apache.karaf.bundle.core.BundleStateService]
Used by bundle 25 (org.apache.karaf.bundle.core:4.3.1.SNAPSHOT)
Config Props: (2 entries)
component.id<Long> = 0
component.name<String> = ServiceComponentRuntimeBundleStateService
References: (total 1)
- scr: org.osgi.service.component.runtime.ServiceComponentRuntime SATISFIED
1..1 static
target=(*) scope=bundle (1 binding):
* Bound to [101] from bundle 55 (org.apache.felix.scr:2.1.24) {code}
I will "improve" the error message (something like "Component expected").
> Karaf shell - scr:info - Cannot coerce info() to any of [(String)]
> ------------------------------------------------------------------
>
> Key: KARAF-3217
> URL: https://issues.apache.org/jira/browse/KARAF-3217
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 2.3.7
> Reporter: Claus Ibsen
> Assignee: Jean-Baptiste Onofré
> Priority: Minor
>
> To reproduce using a vanilla karaf 2.3.7
> bin/karaf
> features:install scr
> scr:list
> scr:aaa
> scr:info
> {code}
> karaf@root> scr:info
> Error executing command: Cannot coerce info() to any of [(String)]
> karaf@root> log:tail
> 2014-09-09 11:48:49,932 | INFO | JMX OSGi Agent | core
> | ? ? | 24 -
> org.apache.aries.jmx.core - 1.1.1 | Registering
> org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@7f7c3215 with name
> osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=e0fc1809-e35b-4124-b942-288b4499066e
> 2014-09-09 11:48:49,933 | INFO | JMX OSGi Agent | core
> | ? ? | 24 -
> org.apache.aries.jmx.core - 1.1.1 | Registering
> org.osgi.jmx.framework.FrameworkMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@7f7c3215 with name
> osgi.core:type=framework,version=1.7,framework=org.apache.felix.framework,uuid=e0fc1809-e35b-4124-b942-288b4499066e
> 2014-09-09 11:48:49,934 | INFO | JMX OSGi Agent | core
> | ? ? | 24 -
> org.apache.aries.jmx.core - 1.1.1 | Registering
> org.osgi.jmx.framework.PackageStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@7f7c3215 with name
> osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=e0fc1809-e35b-4124-b942-288b4499066e
> 2014-09-09 11:48:49,934 | INFO | JMX OSGi Agent | core
> | ? ? | 24 -
> org.apache.aries.jmx.core - 1.1.1 | Registering
> org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@7f7c3215 with name
> osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=e0fc1809-e35b-4124-b942-288b4499066e
> 2014-09-09 11:48:49,934 | INFO | JMX OSGi Agent | core
> | ? ? | 24 -
> org.apache.aries.jmx.core - 1.1.1 | Registering
> org.osgi.jmx.framework.ServiceStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@7f7c3215 with name
> osgi.core:type=serviceState,version=1.7,framework=org.apache.felix.framework,uuid=e0fc1809-e35b-4124-b942-288b4499066e
> 2014-09-09 11:48:49,935 | INFO | JMX OSGi Agent | core
> | ? ? | 24 -
> org.apache.aries.jmx.core - 1.1.1 | Registering
> org.osgi.jmx.framework.BundleStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@7f7c3215 with name
> osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=e0fc1809-e35b-4124-b942-288b4499066e
> 2014-09-09 11:49:01,730 | INFO | l Console Thread | DetailsCommandComponent
> | hell.scr.DetailsCommandComponent 67 | 57 -
> org.apache.karaf.shell.scr - 2.3.7 | Activating the Apache Karaf SCR Details
> Command
> 2014-09-09 11:49:01,738 | INFO | l Console Thread | ListCommandComponent
> | f.shell.scr.ListCommandComponent 61 | 57 -
> org.apache.karaf.shell.scr - 2.3.7 | Activating the Apache Karaf SCR List
> Command
> 2014-09-09 11:49:01,741 | INFO | l Console Thread | ActivateCommandComponent
> | ell.scr.ActivateCommandComponent 66 | 57 -
> org.apache.karaf.shell.scr - 2.3.7 | Activating the Apache Karaf SCR Activate
> Command
> 2014-09-09 11:49:01,743 | INFO | l Console Thread |
> DeactivateCommandComponent | l.scr.DeactivateCommandComponent 66 | 57
> - org.apache.karaf.shell.scr - 2.3.7 | Activating the Apache Karaf SCR
> Deactivate Command
> 2014-09-09 11:49:01,757 | INFO | l Console Thread | ScrServiceMBeanImpl
> | scr.internal.ScrServiceMBeanImpl 78 | 58 -
> org.apache.karaf.management.mbeans.scr - 2.3.7 | Activating the Apache Karaf
> SCR Service MBean
> 2014-09-09 11:49:10,839 | ERROR | l Console Thread | Console
> | araf.shell.console.jline.Console 213 | 14 -
> org.apache.karaf.shell.console - 2.3.7 | Exception caught while executing
> command
> java.lang.IllegalArgumentException: Cannot coerce info() to any of [(String)]
> at
> org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:178)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.7]
> at
> org.apache.karaf.shell.console.jline.Console.run(Console.java:184)[14:org.apache.karaf.shell.console:2.3.7]
> at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
> {code}
> There is no scr:info command, but somehow the shell tries something different?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)