You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Martin Lichtin <li...@yahoo.com.INVALID> on 2015/06/04 14:03:29 UTC

camel:context-inflight returns 'Object name cannot be null'

Trying a new command.

karaf> camel:context-inflight myCamelContext
Error executing command: Object name cannot be null



Re: Re: camel:context-inflight returns 'Object name cannot be null'

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah that seems like a bug. You are welcome to log a JIRA and also
much welcome to work on a patch to fix it.
http://camel.apache.org/support


On Sun, Jun 7, 2015 at 3:41 PM, Martin Lichtin <li...@yahoo.com> wrote:
> Camel 2.15.1, yes other camel: commands work.
>
> karaf> log:exception-display
> javax.management.RuntimeOperationsException: Object name cannot be null
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.isRegistered(DefaultMBeanServerInterceptor.java:569)[:1.8.0_45]
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.isRegistered(JmxMBeanServer.java:638)[:1.8.0_45]
>         at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_45]
>         at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_45]
>         at
> org.apache.karaf.management.boot.KarafMBeanServerBuilder$MBeanInvocationHandler.invoke(KarafMBeanServerBuilder.java:80)[karaf-jmx-boot.jar:]
>         at com.sun.proxy.$Proxy0.isRegistered(Unknown Source)[:]
>         at
> org.apache.camel.commands.AbstractLocalCamelController.browseInflightExchanges(AbstractLocalCamelController.java:186)
>         at
> org.apache.camel.commands.ContextInflightCommand.performContextCommand(ContextInflightCommand.java:56)
>         at
> org.apache.camel.commands.AbstractContextCommand.executeLocal(AbstractContextCommand.java:74)
>         at
> org.apache.camel.commands.AbstractContextCommand.execute(AbstractContextCommand.java:42)
>         at
> org.apache.camel.karaf.commands.ContextInflight.doExecute(ContextInflight.java:40)
>         at
> org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3]
>         at Proxy199cb572_c6d4_4d06_851e_3f55b795651b.execute(Unknown
> Source)[:]
>         at Proxy199cb572_c6d4_4d06_851e_3f55b795651b.execute(Unknown
> Source)[:]
>         at
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:3.0.3]
>         at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
>         at
> org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208)
>         at
> org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:158)[52:org.apache.karaf.shell.ssh:3.0.3]
>         at
> org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:133)
>         at java.security.AccessController.doPrivileged(Native
> Method)[:1.8.0_45]
>         at
> org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[26:org.apache.karaf.jaas.modules:3.0.3]
>         at
> org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:129)[52:org.apache.karaf.shell.ssh:3.0.3]
> Caused by: java.lang.IllegalArgumentException: Object name cannot be null
>         ... 30 more
>
> I think when combining the object name
>
>             Set<ObjectName> set = mBeanServer.queryNames(new
> ObjectName(agent.getMBeanObjectDomainName() +
> ":type=services,name=DefaultInflightRepository,*"), null);
>
> The ":context=context-name" part is missing.
> The query should be something like
>
> org.apache.camel:context=<context-name>,type=services,name=DefaultInflightRepository
>
> Not sure why the ",*" at the end would be needed.
>
> - Martin
>
>
> On 05.06.2015 08:41, Claus Ibsen wrote:
>>
>> You can do a log:display-exception to get more details.
>>
>> Also what version of Camel, Karaf are you using. And does some of the
>> other karaf camel commands works?
>>
>> On Thu, Jun 4, 2015 at 2:03 PM, Martin Lichtin
>> <li...@yahoo.com.invalid> wrote:
>>>
>>> Trying a new command.
>>>
>>> karaf> camel:context-inflight myCamelContext
>>> Error executing command: Object name cannot be null



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Re: camel:context-inflight returns 'Object name cannot be null'

Posted by Martin Lichtin <li...@yahoo.com.INVALID>.
Camel 2.15.1, yes other camel: commands work.

karaf> log:exception-display
javax.management.RuntimeOperationsException: Object name cannot be null
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.isRegistered(DefaultMBeanServerInterceptor.java:569)[:1.8.0_45]
         at com.sun.jmx.mbeanserver.JmxMBeanServer.isRegistered(JmxMBeanServer.java:638)[:1.8.0_45]
         at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_45]
         at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_45]
         at org.apache.karaf.management.boot.KarafMBeanServerBuilder$MBeanInvocationHandler.invoke(KarafMBeanServerBuilder.java:80)[karaf-jmx-boot.jar:]
         at com.sun.proxy.$Proxy0.isRegistered(Unknown Source)[:]
         at org.apache.camel.commands.AbstractLocalCamelController.browseInflightExchanges(AbstractLocalCamelController.java:186)
         at org.apache.camel.commands.ContextInflightCommand.performContextCommand(ContextInflightCommand.java:56)
         at org.apache.camel.commands.AbstractContextCommand.executeLocal(AbstractContextCommand.java:74)
         at org.apache.camel.commands.AbstractContextCommand.execute(AbstractContextCommand.java:42)
         at org.apache.camel.karaf.commands.ContextInflight.doExecute(ContextInflight.java:40)
         at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3]
         at Proxy199cb572_c6d4_4d06_851e_3f55b795651b.execute(Unknown Source)[:]
         at Proxy199cb572_c6d4_4d06_851e_3f55b795651b.execute(Unknown Source)[:]
         at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:3.0.3]
         at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
         at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208)
         at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:158)[52:org.apache.karaf.shell.ssh:3.0.3]
         at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:133)
         at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_45]
         at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[26:org.apache.karaf.jaas.modules:3.0.3]
         at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:129)[52:org.apache.karaf.shell.ssh:3.0.3]
Caused by: java.lang.IllegalArgumentException: Object name cannot be null
         ... 30 more

I think when combining the object name

             Set<ObjectName> set = mBeanServer.queryNames(new ObjectName(agent.getMBeanObjectDomainName() + ":type=services,name=DefaultInflightRepository,*"), null);

The ":context=context-name" part is missing.
The query should be something like

org.apache.camel:context=<context-name>,type=services,name=DefaultInflightRepository

Not sure why the ",*" at the end would be needed.

- Martin

On 05.06.2015 08:41, Claus Ibsen wrote:
> You can do a log:display-exception to get more details.
>
> Also what version of Camel, Karaf are you using. And does some of the
> other karaf camel commands works?
>
> On Thu, Jun 4, 2015 at 2:03 PM, Martin Lichtin
> <li...@yahoo.com.invalid> wrote:
>> Trying a new command.
>>
>> karaf> camel:context-inflight myCamelContext
>> Error executing command: Object name cannot be null

Re: camel:context-inflight returns 'Object name cannot be null'

Posted by Claus Ibsen <cl...@gmail.com>.
You can do a log:display-exception to get more details.

Also what version of Camel, Karaf are you using. And does some of the
other karaf camel commands works?

On Thu, Jun 4, 2015 at 2:03 PM, Martin Lichtin
<li...@yahoo.com.invalid> wrote:
> Trying a new command.
>
> karaf> camel:context-inflight myCamelContext
> Error executing command: Object name cannot be null
>
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/